Browse Source

test

master
cgx 1 year ago
parent
commit
03e5776f85
66 changed files with 5805 additions and 89 deletions
  1. +1
    -1
      admin-hanhai-vue/.env
  2. +1
    -1
      admin-hanhai-vue/.env.development
  3. +1
    -1
      admin-hanhai-vue/.env.production
  4. BIN
      admin-hanhai-vue/public/img.png
  5. +3
    -3
      admin-hanhai-vue/public/index.html
  6. BIN
      admin-hanhai-vue/public/logo.png
  7. BIN
      admin-hanhai-vue/src/assets/logo.png
  8. +1
    -1
      admin-hanhai-vue/src/components/layouts/TabLayout.vue
  9. +2
    -2
      admin-hanhai-vue/src/components/layouts/UserLayout.vue
  10. +2
    -2
      admin-hanhai-vue/src/components/page/GlobalHeader.vue
  11. +1
    -1
      admin-hanhai-vue/src/components/tools/Logo.vue
  12. +197
    -0
      admin-hanhai-vue/src/views/banner/WebBannerList.vue
  13. +130
    -0
      admin-hanhai-vue/src/views/banner/modules/WebBannerForm.vue
  14. +84
    -0
      admin-hanhai-vue/src/views/banner/modules/WebBannerModal.Style#Drawer.vue
  15. +60
    -0
      admin-hanhai-vue/src/views/banner/modules/WebBannerModal.vue
  16. +279
    -0
      admin-hanhai-vue/src/views/customs/TbCustomsList.vue
  17. +164
    -0
      admin-hanhai-vue/src/views/customs/modules/TbCustomsForm.vue
  18. +84
    -0
      admin-hanhai-vue/src/views/customs/modules/TbCustomsModal.Style#Drawer.vue
  19. +60
    -0
      admin-hanhai-vue/src/views/customs/modules/TbCustomsModal.vue
  20. +358
    -0
      admin-hanhai-vue/src/views/industry/TbIndustryList.vue
  21. +162
    -0
      admin-hanhai-vue/src/views/industry/modules/TbIndustryModal.vue
  22. +263
    -0
      admin-hanhai-vue/src/views/product/TbProductList.vue
  23. +147
    -0
      admin-hanhai-vue/src/views/product/modules/TbProductForm.vue
  24. +84
    -0
      admin-hanhai-vue/src/views/product/modules/TbProductModal.Style#Drawer.vue
  25. +60
    -0
      admin-hanhai-vue/src/views/product/modules/TbProductModal.vue
  26. +267
    -0
      admin-hanhai-vue/src/views/productOrder/TbProductOrderList.vue
  27. +150
    -0
      admin-hanhai-vue/src/views/productOrder/modules/TbProductOrderForm.vue
  28. +84
    -0
      admin-hanhai-vue/src/views/productOrder/modules/TbProductOrderModal.Style#Drawer.vue
  29. +60
    -0
      admin-hanhai-vue/src/views/productOrder/modules/TbProductOrderModal.vue
  30. +219
    -0
      admin-hanhai-vue/src/views/suggest/TbSuggestList.vue
  31. +124
    -0
      admin-hanhai-vue/src/views/suggest/modules/TbSuggestForm.vue
  32. +84
    -0
      admin-hanhai-vue/src/views/suggest/modules/TbSuggestModal.Style#Drawer.vue
  33. +60
    -0
      admin-hanhai-vue/src/views/suggest/modules/TbSuggestModal.vue
  34. +177
    -0
      admin-hanhai-vue/src/views/tbConf/TbConfList.vue
  35. +109
    -0
      admin-hanhai-vue/src/views/tbConf/modules/TbConfForm.vue
  36. +84
    -0
      admin-hanhai-vue/src/views/tbConf/modules/TbConfModal.Style#Drawer.vue
  37. +60
    -0
      admin-hanhai-vue/src/views/tbConf/modules/TbConfModal.vue
  38. +278
    -0
      admin-hanhai-vue/src/views/userRole/TbUserRoleList.vue
  39. +159
    -0
      admin-hanhai-vue/src/views/userRole/modules/TbUserRoleForm.vue
  40. +84
    -0
      admin-hanhai-vue/src/views/userRole/modules/TbUserRoleModal.Style#Drawer.vue
  41. +60
    -0
      admin-hanhai-vue/src/views/userRole/modules/TbUserRoleModal.vue
  42. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java
  43. +155
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/controller/TbUserRoleController.java
  44. +111
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/entity/TbUserRole.java
  45. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/TbUserRoleMapper.java
  46. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/xml/TbUserRoleMapper.xml
  47. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/ITbUserRoleService.java
  48. +45
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/impl/TbUserRoleServiceImpl.java
  49. +278
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/TbUserRoleList.vue
  50. +159
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleForm.vue
  51. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.Style#Drawer.vue
  52. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.vue
  53. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.api.ts
  54. +184
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.data.ts
  55. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRoleList.vue
  56. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/components/TbUserRoleModal.vue
  57. +79
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ReqUserRole.java
  58. +0
    -35
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/controller/UserController.java
  59. +2
    -9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/IndexController.java
  60. +51
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/UserController.java
  61. +5
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/AppletLoginService.java
  62. +1
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/IndexService.java
  63. +53
    -4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/AppletLoginServiceImpl.java
  64. +10
    -21
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/IndexServiceImpl.java
  65. +3
    -3
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  66. +2
    -2
      jeecg-boot-module-system/src/main/resources/application-prod.yml

+ 1
- 1
admin-hanhai-vue/.env View File

@ -1,5 +1,5 @@
NODE_ENV=production
VUE_APP_PLATFORM_NAME=用工小程序
VUE_APP_PLATFORM_NAME=铝材交易后台管理系统
# 开启单点登录
VUE_APP_SSO=false
# 开启微应用模式


+ 1
- 1
admin-hanhai-vue/.env.development View File

@ -1,5 +1,5 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:8000/employ-admin/
VUE_APP_API_BASE_URL=http://localhost:8000/employ-api/
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview


+ 1
- 1
admin-hanhai-vue/.env.production View File

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_BASE_URL=http://localhost:8000/employ-admin/
VUE_APP_API_BASE_URL=https://aluminium-prod.hhlm1688.com/aluminium-api/
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

BIN
admin-hanhai-vue/public/img.png View File

Before After
Width: 281  |  Height: 500  |  Size: 74 KiB

+ 3
- 3
admin-hanhai-vue/public/index.html View File

@ -5,8 +5,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>用工小程序</title>
<!-- <link rel="icon" href="<%= BASE_URL %>logo.png">-->
<title>铝材交易后台管理系统</title>
<link rel="icon" href="<%= BASE_URL %>logo.png">
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
<style>
html,
@ -249,7 +249,7 @@
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载 用工小程序,请耐心等待
<div class="load_title">正在加载 铝材交易后台管理系统,请耐心等待
</div>
</div>


BIN
admin-hanhai-vue/public/logo.png View File

Before After
Width: 649  |  Height: 649  |  Size: 7.6 KiB Width: 1000  |  Height: 1000  |  Size: 46 KiB

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

Before After
Width: 649  |  Height: 649  |  Size: 7.6 KiB Width: 1000  |  Height: 1000  |  Size: 46 KiB

+ 1
- 1
admin-hanhai-vue/src/components/layouts/TabLayout.vue View File

@ -177,7 +177,7 @@
// update-begin-author:sunjianlei date:20200120 for:
changeTitle(title) {
let projectTitle = "用工小程序"
let projectTitle = "铝材交易后台管理系统"
//
if (this.$route.path === indexKey) {
document.title = projectTitle


+ 2
- 2
admin-hanhai-vue/src/components/layouts/UserLayout.vue View File

@ -4,8 +4,8 @@
<div class="top">
<div class="header">
<a href="/">
<span class="title">用工小程序</span>
<img src="~@/assets/logo.png" class="logo" alt="logo">
<span class="title">铝材交易</span>
</a>
</div>
<!-- <div class="desc">-->


+ 2
- 2
admin-hanhai-vue/src/components/page/GlobalHeader.vue View File

@ -17,8 +17,8 @@
:type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click="toggle"/>
<span v-if="device === 'desktop'">欢迎进入 用工小程序</span>
<span v-else>用工小程序</span>
<span v-if="device === 'desktop'">欢迎进入 铝材交易后台管理系统</span>
<span v-else>铝材交易后台管理系统</span>
<user-menu :theme="theme"/>
</div>


+ 1
- 1
admin-hanhai-vue/src/components/tools/Logo.vue View File

@ -21,7 +21,7 @@
props: {
title: {
type: String,
default: '用工小程序',
default: '铝材交易',
required: false
},
showTitle: {


+ 197
- 0
admin-hanhai-vue/src/views/banner/WebBannerList.vue View File

@ -0,0 +1,197 @@
<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('banner设置')">导出</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>
<web-banner-modal ref="modalForm" @ok="modalFormOk"></web-banner-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import WebBannerModal from './modules/WebBannerModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'WebBannerList',
mixins:[JeecgListMixin, mixinDevice],
components: {
WebBannerModal
},
data () {
return {
description: 'banner设置管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'图片',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'跳转地址',
align:"center",
dataIndex: 'toUrl'
},
{
title:'排序',
align:"center",
dataIndex: 'sort'
},
{
title:'banner位置',
align:"center",
dataIndex: 'type_dictText'
},
{
title:'是否删除',
align:"center",
dataIndex: 'isDisable_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/banner/webBanner/list",
delete: "/banner/webBanner/delete",
deleteBatch: "/banner/webBanner/deleteBatch",
exportXlsUrl: "/banner/webBanner/exportXls",
importExcelUrl: "banner/webBanner/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:'image',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'toUrl',text:'跳转地址',dictCode:''})
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''})
fieldList.push({type:'int',value:'type',text:'banner位置',dictCode:'bannerType'})
fieldList.push({type:'int',value:'isDisable',text:'是否删除',dictCode:'is_disable'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 130
- 0
admin-hanhai-vue/src/views/banner/modules/WebBannerForm.vue View File

@ -0,0 +1,130 @@
<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="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="跳转地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toUrl">
<a-input v-model="model.toUrl" 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="banner位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<j-dict-select-tag type="list" v-model="model.type" dictCode="bannerType" placeholder="banner位置" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否删除" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isDisable">
<j-dict-select-tag type="list" v-model="model.isDisable" dictCode="is_disable" 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: 'WebBannerForm',
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: {
sort: [
{ required: true, message: '请输入排序!'},
],
isDisable: [
{ required: true, message: '请输入是否删除 0否 1是!'},
],
},
url: {
add: "/banner/webBanner/add",
edit: "/banner/webBanner/edit",
queryById: "/banner/webBanner/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<web-banner-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></web-banner-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 WebBannerForm from './WebBannerForm'
export default {
name: 'WebBannerModal',
components: {
WebBannerForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/banner/modules/WebBannerModal.vue View File

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

+ 279
- 0
admin-hanhai-vue/src/views/customs/TbCustomsList.vue View File

@ -0,0 +1,279 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="角色身份">
<j-dict-select-tag placeholder="请选择角色身份" v-model="queryParam.role" dictCode="user_role"/>
</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.userName"></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.companyName"></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.phone"></a-input>
</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.auditStatus" dictCode="audit_status"/>
</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,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>
<tb-customs-modal ref="modalForm" @ok="modalFormOk"></tb-customs-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbCustomsModal from './modules/TbCustomsModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'TbCustomsList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbCustomsModal
},
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: 'role_dictText'
},
{
title:'用户名',
align:"center",
dataIndex: 'userName'
},
{
title:'公司名称',
align:"center",
dataIndex: 'companyName'
},
{
title:'税收编码',
align:"center",
dataIndex: 'taxCode'
},
{
title:'公司地址',
align:"center",
dataIndex: 'address'
},
{
title:'公司账号',
align:"center",
dataIndex: 'bankAccount'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'开户行',
align:"center",
dataIndex: 'bankNama'
},
{
title:'营业执照上传',
align:"center",
dataIndex: 'businessLicense',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'基本户信息照片上传',
align:"center",
dataIndex: 'basicAccount',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'收款银行照片上传',
align:"center",
dataIndex: 'bankInfo',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'审核状态',
align:"center",
dataIndex: 'auditStatus_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/tbCustoms/tbCustoms/list",
delete: "/tbCustoms/tbCustoms/delete",
deleteBatch: "/tbCustoms/tbCustoms/deleteBatch",
exportXlsUrl: "/tbCustoms/tbCustoms/exportXls",
importExcelUrl: "tbCustoms/tbCustoms/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:'userId',text:'用户id',dictCode:''})
fieldList.push({type:'int',value:'role',text:'角色身份',dictCode:'user_role'})
fieldList.push({type:'string',value:'userName',text:'用户名',dictCode:''})
fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''})
fieldList.push({type:'string',value:'taxCode',text:'税收编码',dictCode:''})
fieldList.push({type:'string',value:'address',text:'公司地址',dictCode:''})
fieldList.push({type:'string',value:'bankAccount',text:'公司账号',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'bankNama',text:'开户行',dictCode:''})
fieldList.push({type:'Text',value:'businessLicense',text:'营业执照上传',dictCode:''})
fieldList.push({type:'Text',value:'basicAccount',text:'基本户信息照片上传',dictCode:''})
fieldList.push({type:'Text',value:'bankInfo',text:'收款银行照片上传',dictCode:''})
fieldList.push({type:'int',value:'auditStatus',text:'审核状态',dictCode:'audit_status'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 164
- 0
admin-hanhai-vue/src/views/customs/modules/TbCustomsForm.vue View File

@ -0,0 +1,164 @@
<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="userId">
<a-input v-model="model.userId" placeholder="请输入用户id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="角色信息 1供应商 2采购商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="role">
<j-dict-select-tag type="list" v-model="model.role" dictCode="user_role" placeholder="请选择角色信息 1供应商 2采购商" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
<a-input v-model="model.userName" placeholder="请输入用户名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName">
<a-input v-model="model.companyName" placeholder="请输入公司名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="税收编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taxCode">
<a-input v-model="model.taxCode" placeholder="请输入税收编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入公司地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankAccount">
<a-input v-model="model.bankAccount" placeholder="请输入公司账号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankNama">
<a-input v-model="model.bankNama" placeholder="请输入开户行" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="营业执照上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessLicense">
<j-image-upload isMultiple v-model="model.businessLicense" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="基本户信息照片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicAccount">
<j-image-upload isMultiple v-model="model.basicAccount" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="收款银行照片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankInfo">
<j-image-upload isMultiple v-model="model.bankInfo" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态 0审核中 1 审核通过 2审核未通过" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus">
<j-dict-select-tag type="list" v-model="model.auditStatus" dictCode="audit_status" placeholder="请选择审核状态 0审核中 1 审核通过 2审核未通过" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TbCustomsForm',
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: "/tbCustoms/tbCustoms/add",
edit: "/tbCustoms/tbCustoms/edit",
queryById: "/tbCustoms/tbCustoms/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-customs-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-customs-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 TbCustomsForm from './TbCustomsForm'
export default {
name: 'TbCustomsModal',
components: {
TbCustomsForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/customs/modules/TbCustomsModal.vue View File

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

+ 358
- 0
admin-hanhai-vue/src/views/industry/TbIndustryList.vue View File

@ -0,0 +1,358 @@
<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>
</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"
rowKey="id"
class="j-table-force-nowrap"
:scroll="{x:true}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:expandedRowKeys="expandedRowKeys"
@change="handleTableChange"
@expand="handleExpand"
v-bind="tableProps">
<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="handleAddChild(record)">添加下级</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteNode(record.id)" placement="topLeft">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tbIndustry-modal ref="modalForm" @ok="modalFormOk"></tbIndustry-modal>
</a-card>
</template>
<script>
import { getAction, deleteAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbIndustryModal from './modules/TbIndustryModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { filterObj } from '@/utils/util';
export default {
name: "TbIndustryList",
mixins:[JeecgListMixin],
components: {
TbIndustryModal
},
data () {
return {
description: 'tb_industry管理页面',
//
columns: [
{
title:'名称',
align:"left",
dataIndex: 'name'
},
{
title:'图标',
align:"left",
dataIndex: 'icon',
scopedSlots: {customRender: 'imgSlot'}
}
,
{
title:'排序',
align:"left",
dataIndex: 'sortNo'
},
{
title:'行业/工种',
align:"left",
dataIndex: 'menuType_dictText'
}
,
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/industry/tbIndustry/rootList",
childList: "/industry/tbIndustry/childList",
getChildListBatch: "/industry/tbIndustry/getChildListBatch",
delete: "/industry/tbIndustry/delete",
deleteBatch: "/industry/tbIndustry/deleteBatch",
exportXlsUrl: "/industry/tbIndustry/exportXls",
importExcelUrl: "industry/tbIndustry/importExcel",
},
expandedRowKeys:[],
hasChildrenField:"hasChild",
pidField:"pid",
dictOptions: {},
loadParent: false,
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
tableProps() {
let _this = this
return {
//
rowSelection: {
selectedRowKeys: _this.selectedRowKeys,
onChange: (selectedRowKeys) => _this.selectedRowKeys = selectedRowKeys
}
}
}
},
methods: {
loadData(arg){
if(arg==1){
this.ipagination.current=1
}
this.loading = true
let params = this.getQueryParams()
params.hasQuery = 'true'
getAction(this.url.list,params).then(res=>{
if(res.success){
let result = res.result
if(Number(result.total)>0){
this.ipagination.total = Number(result.total)
this.dataSource = this.getDataByResult(res.result.records)
return this.loadDataByExpandedRows(this.dataSource)
}else{
this.ipagination.total=0
this.dataSource=[]
}
}else{
this.$message.warning(res.message)
}
}).finally(()=>{
this.loading = false
})
},
//
loadDataByExpandedRows(dataList) {
if (this.expandedRowKeys.length > 0) {
return getAction(this.url.getChildListBatch,{ parentIds: this.expandedRowKeys.join(',') }).then(res=>{
if (res.success && res.result.records.length>0) {
//
let records = res.result.records
const listMap = new Map();
for (let item of records) {
let pid = item[this.pidField];
if (this.expandedRowKeys.join(',').includes(pid)) {
let mapList = listMap.get(pid);
if (mapList == null) {
mapList = [];
}
mapList.push(item);
listMap.set(pid, mapList);
}
}
let childrenMap = listMap;
let fn = (list) => {
if(list) {
list.forEach(data => {
if (this.expandedRowKeys.includes(data.id)) {
data.children = this.getDataByResult(childrenMap.get(data.id))
fn(data.children)
}
})
}
}
fn(dataList)
}
})
} else {
return Promise.resolve()
}
},
getQueryParams(arg) {
//
let sqp = {}
let param = {}
if(this.superQueryParams){
sqp['superQueryParams']=encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
if(arg){
param = Object.assign(sqp, this.isorter ,this.filters);
}else{
param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
}
if(JSON.stringify(this.queryParam) === "{}" || arg){
param.hasQuery = 'false'
}else{
param.hasQuery = 'true'
}
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
return filterObj(param);
},
searchReset() {
//
this.expandedRowKeys = []
this.queryParam = {}
this.loadData(1);
},
getDataByResult(result){
if(result){
return result.map(item=>{
//
if(item[this.hasChildrenField]=='1'){
let loadChild = { id: item.id+'_loadChild', name: 'loading...', isLoading: true }
item.children = [loadChild]
}
return item
})
}
},
handleExpand(expanded, record){
//
if (expanded) {
this.expandedRowKeys.push(record.id)
if (record.children.length>0 && record.children[0].isLoading === true) {
let params = this.getQueryParams(1);//
params[this.pidField] = record.id
params.hasQuery = 'false'
params.superQueryParams=""
getAction(this.url.childList,params).then((res)=>{
if(res.success){
if(res.result.records){
record.children = this.getDataByResult(res.result.records)
this.dataSource = [...this.dataSource]
}else{
record.children=''
record.hasChildrenField='0'
}
}else{
this.$message.warning(res.message)
}
})
}
}else{
let keyIndex = this.expandedRowKeys.indexOf(record.id)
if(keyIndex>=0){
this.expandedRowKeys.splice(keyIndex, 1);
}
}
},
handleAddChild(record){
this.loadParent = true
let obj = {}
obj[this.pidField] = record['id']
this.$refs.modalForm.add(obj);
},
handleDeleteNode(id) {
if(!this.url.delete){
this.$message.error("请设置url.delete属性!")
return
}
var that = this;
deleteAction(that.url.delete, {id: id}).then((res) => {
if (res.success) {
that.loadData(1)
} else {
that.$message.warning(res.message);
}
});
},
batchDel(){
if(this.selectedRowKeys.length<=0){
this.$message.warning('请选择一条记录!');
return false;
}else{
let ids = "";
let that = this;
that.selectedRowKeys.forEach(function(val) {
ids+=val+",";
});
that.$confirm({
title:"确认删除",
content:"是否删除选中数据?",
onOk: function(){
that.handleDeleteNode(ids)
that.onClearSelected();
}
});
}
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'行业名称',dictCode:''})
fieldList.push({type:'int',value:'menuType',text:'菜单类型(0:一级行业菜单; 1:工种菜单)',dictCode:'emp_menu_type'})
fieldList.push({type:'double',value:'sortNo',text:'排序',dictCode:''})
fieldList.push({type:'string',value:'icon',text:'图标',dictCode:''})
fieldList.push({type:'string',value:'pid',text:'父级节点',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 162
- 0
admin-hanhai-vue/src/views/industry/modules/TbIndustryModal.vue View File

@ -0,0 +1,162 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入行业/工种名称" ></a-input>
</a-form-model-item>
<a-form-model-item label="所属行业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
<j-tree-select
ref="treeSelect"
placeholder="请选择所属行业"
v-model="model.pid"
dict="tb_industry,name,id"
pidField="pid"
pidValue="0"
hasChildField="has_child"
>
</j-tree-select>
</a-form-model-item>
<a-form-model-item label="图标" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="icon">
<j-image-upload isMultiple v-model="model.icon" ></j-image-upload>
</a-form-model-item>
<a-form-model-item label="菜单类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="menuType">
<j-dict-select-tag type="list" v-model="model.menuType" dictCode="emp_menu_type" placeholder="请选择行业或工种" />
</a-form-model-item>
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sortNo">
<a-input-number v-model="model.sortNo" placeholder="请输入排序" style="width: 100%" />
</a-form-model-item>
</a-form-model>
</a-spin>
</j-modal>
</template>
<script>
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: "TbIndustryModal",
components: {
},
data () {
return {
title:"操作",
width:800,
visible: false,
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/industry/tbIndustry/add",
edit: "/industry/tbIndustry/edit",
},
expandedRowKeys:[],
pidField:"pid"
}
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add (obj) {
this.modelDefault.pid=''
this.edit(Object.assign(this.modelDefault , obj));
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate()
},
handleOk () {
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';
}
if(this.model.id && this.model.id === this.model[this.pidField]){
that.$message.warning("父级节点不能选择自己");
that.confirmLoading = false;
return;
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
this.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
}else{
return false
}
})
},
handleCancel () {
this.close()
},
submitSuccess(formData,flag){
if(!formData.id){
let treeData = this.$refs.treeSelect.getCurrTreeData()
this.expandedRowKeys=[]
this.getExpandKeysByPid(formData[this.pidField],treeData,treeData)
this.$emit('ok',formData,this.expandedRowKeys.reverse());
}else{
this.$emit('ok',formData,flag);
}
},
getExpandKeysByPid(pid,arr,all){
if(pid && arr && arr.length>0){
for(let i=0;i<arr.length;i++){
if(arr[i].key==pid){
this.expandedRowKeys.push(arr[i].key)
this.getExpandKeysByPid(arr[i]['parentId'],all,all)
}else{
this.getExpandKeysByPid(pid,arr[i].children,all)
}
}
}
}
}
}
</script>

+ 263
- 0
admin-hanhai-vue/src/views/product/TbProductList.vue View File

@ -0,0 +1,263 @@
<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="供应商名称">
<a-input placeholder="请输入供应商名称" v-model="queryParam.companyName"></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.phone"></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="审核状态">
<j-dict-select-tag placeholder="请选择审核状态" v-model="queryParam.auditStatus" dictCode="audit_status"/>
</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.showStatus" dictCode="show_status"/>
</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.productType" dictCode="product_type"/>
</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,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>
<tb-product-modal ref="modalForm" @ok="modalFormOk"></tb-product-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbProductModal from './modules/TbProductModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'TbProductList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbProductModal
},
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: 'companyName'
},
{
title:'提货地址',
align:"center",
dataIndex: 'address'
},
{
title:'单价',
align:"center",
dataIndex: 'price'
},
{
title:'暂定数量',
align:"center",
dataIndex: 'num'
},
{
title:'审核状态',
align:"center",
dataIndex: 'auditStatus_dictText'
},
{
title:'挂单状态',
align:"center",
dataIndex: 'showStatus_dictText'
},
{
title:'期货现货',
align:"center",
dataIndex: 'productType_dictText'
},
{
title:'排序',
align:"center",
dataIndex: 'sortNum'
},
{
title:'提货时间',
align:"center",
dataIndex: 'transactionTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/product/tbProduct/list",
delete: "/product/tbProduct/delete",
deleteBatch: "/product/tbProduct/deleteBatch",
exportXlsUrl: "/product/tbProduct/exportXls",
importExcelUrl: "product/tbProduct/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:'companyName',text:'供应商名称',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'客户电话',dictCode:''})
fieldList.push({type:'string',value:'address',text:'提货地址',dictCode:''})
fieldList.push({type:'Text',value:'pic',text:'报价照片',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'单价',dictCode:''})
fieldList.push({type:'int',value:'num',text:'暂定数量、',dictCode:''})
fieldList.push({type:'popup',value:'sortNum',text:'排序', popup:{code:'',field:'',orgFields:'',destFields:''}})
fieldList.push({type:'int',value:'auditStatus',text:'审核状态 0审核中 1 审核通过 2审核未通过',dictCode:'audit_status'})
fieldList.push({type:'int',value:'showStatus',text:'挂单状态 0挂单 1 已撤单',dictCode:'show_status'})
fieldList.push({type:'int',value:'productType',text:'期货现货 0期货 1 现货',dictCode:'product_type'})
fieldList.push({type:'date',value:'transactionTime',text:'交货时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 147
- 0
admin-hanhai-vue/src/views/product/modules/TbProductForm.vue View File

@ -0,0 +1,147 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="供应商名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName">
<a-input v-model="model.companyName" 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.sortNum" placeholder="请输入排序" style="width: 100%" />
</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="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="num">
<a-input-number v-model="model.num" placeholder="请输入暂定数量、" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus">
<j-dict-select-tag type="list" v-model="model.auditStatus" dictCode="audit_status" placeholder="请选择审核状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="挂单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="showStatus">
<j-dict-select-tag type="list" v-model="model.showStatus" dictCode="show_status" placeholder="请选择挂单状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="期货现货" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType">
<j-dict-select-tag type="list" v-model="model.productType" dictCode="product_type" placeholder="请选择期货现货" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="提货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transactionTime">
<j-date placeholder="请选择提货时间" v-model="model.transactionTime" 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: 'TbProductForm',
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: {
price: [
{ required: true, message: '请输入单价!'},
],
},
url: {
add: "/product/tbProduct/add",
edit: "/product/tbProduct/edit",
queryById: "/product/tbProduct/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-product-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-product-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 TbProductForm from './TbProductForm'
export default {
name: 'TbProductModal',
components: {
TbProductForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/product/modules/TbProductModal.vue View File

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

+ 267
- 0
admin-hanhai-vue/src/views/productOrder/TbProductOrderList.vue View File

@ -0,0 +1,267 @@
<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="供应商名称">
<a-input placeholder="请输入供应商名称" v-model="queryParam.companyName"></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.userName"></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.phone"></a-input>
</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.productType" dictCode="product_type"/>
</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,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>
<tb-product-order-modal ref="modalForm" @ok="modalFormOk"></tb-product-order-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbProductOrderModal from './modules/TbProductOrderModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'TbProductOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbProductOrderModal
},
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: 'companyName'
},
{
title:'客户姓名',
align:"center",
dataIndex: 'userName'
},
{
title:'客户电话',
align:"center",
dataIndex: 'phone'
},
{
title:'提货地址',
align:"center",
dataIndex: 'address'
},
{
title:'单价',
align:"center",
dataIndex: 'price'
},
{
title:'定金',
align:"center",
dataIndex: 'deposit'
},
{
title:'暂定数量、',
align:"center",
dataIndex: 'num'
},
{
title:'期货现货',
align:"center",
dataIndex: 'productType_dictText'
},
{
title:'交货时间',
align:"center",
dataIndex: 'transactionTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'提货时间',
align:"center",
dataIndex: 'takeTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/productOrder/tbProductOrder/list",
delete: "/productOrder/tbProductOrder/delete",
deleteBatch: "/productOrder/tbProductOrder/deleteBatch",
exportXlsUrl: "/productOrder/tbProductOrder/exportXls",
importExcelUrl: "productOrder/tbProductOrder/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:'companyName',text:'供应商名称',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'客户姓名',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'客户电话',dictCode:''})
fieldList.push({type:'string',value:'address',text:'提货地址',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'单价',dictCode:''})
fieldList.push({type:'BigDecimal',value:'deposit',text:'定金',dictCode:''})
fieldList.push({type:'int',value:'num',text:'暂定数量、',dictCode:''})
fieldList.push({type:'int',value:'auditStatus',text:'审核状态',dictCode:'audit_status'})
fieldList.push({type:'int',value:'showStatus',text:'挂单状态',dictCode:'show_status'})
fieldList.push({type:'int',value:'productType',text:'期货现货',dictCode:'product_type'})
fieldList.push({type:'date',value:'transactionTime',text:'交货时间'})
fieldList.push({type:'date',value:'takeTime',text:'提货时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 150
- 0
admin-hanhai-vue/src/views/productOrder/modules/TbProductOrderForm.vue View File

@ -0,0 +1,150 @@
<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="companyName">
<a-input v-model="model.companyName" placeholder="请输入供应商名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
<a-input v-model="model.userName" placeholder="请输入客户姓名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入客户电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="提货地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="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="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="deposit">
<a-input-number v-model="model.deposit" placeholder="请输入定金" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="暂定数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
<a-input-number v-model="model.num" placeholder="请输入暂定数量、" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="期货现货" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productType">
<j-dict-select-tag type="list" v-model="model.productType" dictCode="product_type" placeholder="请选择期货现货" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="提货时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="takeTime">
<j-date placeholder="请选择提货时间" v-model="model.takeTime" 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: 'TbProductOrderForm',
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: {
price: [
{ required: true, message: '请输入单价!'},
],
deposit: [
{ required: true, message: '请输入定金!'},
],
},
url: {
add: "/productOrder/tbProductOrder/add",
edit: "/productOrder/tbProductOrder/edit",
queryById: "/productOrder/tbProductOrder/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-product-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-product-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 TbProductOrderForm from './TbProductOrderForm'
export default {
name: 'TbProductOrderModal',
components: {
TbProductOrderForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/productOrder/modules/TbProductOrderModal.vue View File

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

+ 219
- 0
admin-hanhai-vue/src/views/suggest/TbSuggestList.vue View File

@ -0,0 +1,219 @@
<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="用户名">
<a-input placeholder="请输入用户名" v-model="queryParam.userName"></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.userPhone"></a-input>
</a-form-item>
</a-col>
<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,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>
<tb-suggest-modal ref="modalForm" @ok="modalFormOk"></tb-suggest-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbSuggestModal from './modules/TbSuggestModal'
export default {
name: 'TbSuggestList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbSuggestModal
},
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: 'userName'
},
{
title:'用户手机号',
align:"center",
dataIndex: 'userPhone'
},
{
title:'问题描述',
align:"center",
dataIndex: 'content'
},
{
title:'问题截图',
align:"center",
dataIndex: 'proofImg',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'提交时间',
align:"center",
dataIndex: 'submitTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/tbSuggest/tbSuggest/list",
delete: "/tbSuggest/tbSuggest/delete",
deleteBatch: "/tbSuggest/tbSuggest/deleteBatch",
exportXlsUrl: "/tbSuggest/tbSuggest/exportXls",
importExcelUrl: "tbSuggest/tbSuggest/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:'userName',text:'用户名',dictCode:''})
fieldList.push({type:'string',value:'userPhone',text:'用户手机号',dictCode:''})
fieldList.push({type:'Text',value:'content',text:'问题描述',dictCode:''})
fieldList.push({type:'Text',value:'proofImg',text:'问题截图',dictCode:''})
fieldList.push({type:'date',value:'submitTime',text:'提交时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 124
- 0
admin-hanhai-vue/src/views/suggest/modules/TbSuggestForm.vue View File

@ -0,0 +1,124 @@
<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="userName">
<a-input v-model="model.userName" placeholder="请输入用户名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户手机号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userPhone">
<a-input v-model="model.userPhone" placeholder="请输入用户手机号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="问题描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="content">
<a-input v-model="model.content" placeholder="请输入问题描述" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="问题截图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="proofImg">
<j-image-upload isMultiple v-model="model.proofImg" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="提交时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="submitTime">
<j-date placeholder="请选择提交时间" v-model="model.submitTime" 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: 'TbSuggestForm',
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: "/tbSuggest/tbSuggest/add",
edit: "/tbSuggest/tbSuggest/edit",
queryById: "/tbSuggest/tbSuggest/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-suggest-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-suggest-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 TbSuggestForm from './TbSuggestForm'
export default {
name: 'TbSuggestModal',
components: {
TbSuggestForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/suggest/modules/TbSuggestModal.vue View File

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

+ 177
- 0
admin-hanhai-vue/src/views/tbConf/TbConfList.vue View File

@ -0,0 +1,177 @@
<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 type="primary" icon="download" @click="handleExportXls('tb_conf')">导出</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>
<tb-conf-modal ref="modalForm" @ok="modalFormOk"></tb-conf-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbConfModal from './modules/TbConfModal'
export default {
name: 'TbConfList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbConfModal
},
data () {
return {
description: 'tb_conf管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'配置项',
align:"center",
dataIndex: 'info'
},
{
title:'配置值',
align:"center",
dataIndex: 'value'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/tbConf/tbConf/list",
delete: "/tbConf/tbConf/delete",
deleteBatch: "/tbConf/tbConf/deleteBatch",
exportXlsUrl: "/tbConf/tbConf/exportXls",
importExcelUrl: "tbConf/tbConf/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'Text',value:'value',text:'配置值',dictCode:''})
fieldList.push({type:'string',value:'info',text:'配置项',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 109
- 0
admin-hanhai-vue/src/views/tbConf/modules/TbConfForm.vue View File

@ -0,0 +1,109 @@
<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="value">
<a-input v-model="model.value" placeholder="请输入配置值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="配置项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="info">
<a-input v-model="model.info" 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: 'TbConfForm',
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: "/tbConf/tbConf/add",
edit: "/tbConf/tbConf/edit",
queryById: "/tbConf/tbConf/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-conf-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-conf-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 TbConfForm from './TbConfForm'
export default {
name: 'TbConfModal',
components: {
TbConfForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/tbConf/modules/TbConfModal.vue View File

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

+ 278
- 0
admin-hanhai-vue/src/views/userRole/TbUserRoleList.vue View File

@ -0,0 +1,278 @@
<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-dict-select-tag placeholder="请选择角色身份" v-model="queryParam.role" dictCode="user_role"/>
</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.userName"></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.companyName"></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.phone"></a-input>
</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.auditStatus" dictCode="audit_status"/>
</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,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>
<tb-user-role-modal ref="modalForm" @ok="modalFormOk"></tb-user-role-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbUserRoleModal from './modules/TbUserRoleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'TbUserRoleList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbUserRoleModal
},
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: 'role_dictText'
},
{
title:'用户名',
align:"center",
dataIndex: 'userName'
},
{
title:'公司名称',
align:"center",
dataIndex: 'companyName'
},
{
title:'税收编码',
align:"center",
dataIndex: 'taxCode'
},
{
title:'公司地址',
align:"center",
dataIndex: 'address'
},
{
title:'公司账号',
align:"center",
dataIndex: 'bankAccount'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'开户行',
align:"center",
dataIndex: 'bankNama'
},
{
title:'营业执照上传',
align:"center",
dataIndex: 'businessLicense',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'基本户信息照片上传',
align:"center",
dataIndex: 'basicAccount',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'收款银行照片上传',
align:"center",
dataIndex: 'bankInfo',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'审核状态',
align:"center",
dataIndex: 'auditStatus_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/userRole/tbUserRole/list",
delete: "/userRole/tbUserRole/delete",
deleteBatch: "/userRole/tbUserRole/deleteBatch",
exportXlsUrl: "/userRole/tbUserRole/exportXls",
importExcelUrl: "userRole/tbUserRole/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'int',value:'role',text:'角色信息',dictCode:'user_role'})
fieldList.push({type:'string',value:'userName',text:'用户名',dictCode:''})
fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''})
fieldList.push({type:'string',value:'taxCode',text:'税收编码',dictCode:''})
fieldList.push({type:'string',value:'address',text:'公司地址',dictCode:''})
fieldList.push({type:'string',value:'bankAccount',text:'公司账号',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'bankNama',text:'开户行',dictCode:''})
fieldList.push({type:'Text',value:'businessLicense',text:'营业执照上传',dictCode:''})
fieldList.push({type:'Text',value:'basicAccount',text:'基本户信息照片上传',dictCode:''})
fieldList.push({type:'Text',value:'bankInfo',text:'收款银行照片上传',dictCode:''})
fieldList.push({type:'int',value:'auditStatus',text:'审核状态 ',dictCode:'audit_status'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 159
- 0
admin-hanhai-vue/src/views/userRole/modules/TbUserRoleForm.vue View File

@ -0,0 +1,159 @@
<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="role">
<j-dict-select-tag type="list" v-model="model.role" dictCode="user_role" placeholder="请选择角色身份" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
<a-input v-model="model.userName" placeholder="请输入用户名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName">
<a-input v-model="model.companyName" placeholder="请输入公司名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="税收编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taxCode">
<a-input v-model="model.taxCode" placeholder="请输入税收编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入公司地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankAccount">
<a-input v-model="model.bankAccount" placeholder="请输入公司账号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankNama">
<a-input v-model="model.bankNama" placeholder="请输入开户行" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="营业执照上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessLicense">
<j-image-upload isMultiple v-model="model.businessLicense" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="基本户信息照片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicAccount">
<j-image-upload isMultiple v-model="model.basicAccount" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="收款银行照片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankInfo">
<j-image-upload isMultiple v-model="model.bankInfo" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus">
<j-dict-select-tag type="list" v-model="model.auditStatus" dictCode="audit_status" 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: 'TbUserRoleForm',
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: "/userRole/tbUserRole/add",
edit: "/userRole/tbUserRole/edit",
queryById: "/userRole/tbUserRole/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-user-role-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-user-role-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 TbUserRoleForm from './TbUserRoleForm'
export default {
name: 'TbUserRoleModal',
components: {
TbUserRoleForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
admin-hanhai-vue/src/views/userRole/modules/TbUserRoleModal.vue View File

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

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java View File

@ -68,7 +68,7 @@ public class Swagger2Config implements WebMvcConfigurer {
.apiInfo(apiInfo())
.select()
//此包路径下的类才生成接口文档
.apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.api"))
.apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.userCode"))
//加了ApiOperation注解的类才生成接口文档
.apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))


+ 155
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/controller/TbUserRoleController.java View File

@ -0,0 +1,155 @@
package org.jeecg.modules.userRole.controller;
import java.util.Arrays;
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.modules.userRole.entity.TbUserRole;
import org.jeecg.modules.userRole.service.ITbUserRoleService;
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.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 角色表
* @Author: jeecg-boot
* @Date: 2024-10-16
* @Version: V1.0
*/
@RestController
@RequestMapping("/userRole/tbUserRole")
@Slf4j
public class TbUserRoleController extends JeecgController<TbUserRole, ITbUserRoleService> {
@Autowired
private ITbUserRoleService tbUserRoleService;
/**
* 分页列表查询
*
* @param tbUserRole
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "角色表-分页列表查询")
@ApiOperation(value="角色表-分页列表查询", notes="角色表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TbUserRole>> queryPageList(TbUserRole tbUserRole,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TbUserRole> queryWrapper = QueryGenerator.initQueryWrapper(tbUserRole, req.getParameterMap());
Page<TbUserRole> page = new Page<TbUserRole>(pageNo, pageSize);
IPage<TbUserRole> pageList = tbUserRoleService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param tbUserRole
* @return
*/
@AutoLog(value = "角色表-添加")
@ApiOperation(value="角色表-添加", notes="角色表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TbUserRole tbUserRole) {
tbUserRoleService.save(tbUserRole);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param tbUserRole
* @return
*/
@AutoLog(value = "角色表-编辑")
@ApiOperation(value="角色表-编辑", notes="角色表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TbUserRole tbUserRole) {
tbUserRoleService.updateById(tbUserRole);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "角色表-通过id删除")
@ApiOperation(value="角色表-通过id删除", notes="角色表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
tbUserRoleService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "角色表-批量删除")
@ApiOperation(value="角色表-批量删除", notes="角色表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.tbUserRoleService.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<TbUserRole> queryById(@RequestParam(name="id",required=true) String id) {
TbUserRole tbUserRole = tbUserRoleService.getById(id);
if(tbUserRole==null) {
return Result.error("未找到对应数据");
}
return Result.OK(tbUserRole);
}
/**
* 导出excel
*
* @param request
* @param tbUserRole
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TbUserRole tbUserRole) {
return super.exportXls(request, tbUserRole, TbUserRole.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, TbUserRole.class);
}
}

+ 111
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/entity/TbUserRole.java View File

@ -0,0 +1,111 @@
package org.jeecg.modules.userRole.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: 2024-10-16
* @Version: V1.0
*/
@Data
@TableName("tb_user_role")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tb_user_role对象", description="角色表")
public class TbUserRole implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**用户id*/
@Excel(name = "用户id", width = 15)
@ApiModelProperty(value = "用户id")
private String userId;
/**角色信息 用人方企业 1 用人方个人 0*/
@Excel(name = "角色信息 用人方企业 1 用人方个人 0", width = 15, dicCode = "user_role")
@Dict(dicCode = "user_role")
@ApiModelProperty(value = "用人方企业 1 用人方个人 0")
private Integer role;
/**用户名*/
@Excel(name = "用户名", width = 15)
@ApiModelProperty(value = "用户名")
private String userName;
/**行业*/
@Excel(name = "行业", width = 15)
@ApiModelProperty(value = "行业")
private String industry;
/**公司名称*/
@Excel(name = "公司名称", width = 15)
@ApiModelProperty(value = "公司名称")
private String companyName;
/**税收编码*/
@Excel(name = "税收编码", width = 15)
@ApiModelProperty(value = "税收编码")
private String taxCode;
/**公司地址*/
@Excel(name = "公司地址", width = 15)
@ApiModelProperty(value = "公司地址")
private String address;
/**公司账号*/
@Excel(name = "公司账号", width = 15)
@ApiModelProperty(value = "公司账号")
private String bankAccount;
/**电话*/
@Excel(name = "电话", width = 15)
@ApiModelProperty(value = "电话")
private String phone;
/**开户行*/
@Excel(name = "开户行", width = 15)
@ApiModelProperty(value = "开户行")
private String bankNama;
/**营业执照上传*/
@Excel(name = "营业执照上传", width = 15)
@ApiModelProperty(value = "营业执照上传")
private String businessLicense;
/**基本户信息照片上传*/
@Excel(name = "基本户信息照片上传", width = 15)
@ApiModelProperty(value = "基本户信息照片上传")
private String basicAccount;
/**收款银行照片上传*/
@Excel(name = "收款银行照片上传", width = 15)
@ApiModelProperty(value = "收款银行照片上传")
private String bankInfo;
/**审核状态 0审核中 1 审核通过 2审核未通过*/
@Excel(name = "审核状态 0审核中 1 审核通过 2审核未通过", width = 15, dicCode = "audit_status")
@Dict(dicCode = "audit_status")
@ApiModelProperty(value = "审核状态 0审核中 1 审核通过 2审核未通过")
private Integer auditStatus;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
}

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/mapper/TbUserRoleMapper.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.userRole.mapper;
import org.jeecg.modules.userRole.entity.TbUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 角色表
* @Author: jeecg-boot
* @Date: 2024-10-16
* @Version: V1.0
*/
public interface TbUserRoleMapper extends BaseMapper<TbUserRole> {
}

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

@ -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.userRole.mapper.TbUserRoleMapper">
</mapper>

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/ITbUserRoleService.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.userRole.service;
import org.jeecg.modules.userRole.entity.TbUserRole;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.Map;
/**
* @Description: 角色表
* @Author: jeecg-boot
* @Date: 2024-10-16
* @Version: V1.0
*/
public interface ITbUserRoleService extends IService<TbUserRole> {
//获取首页基础信息
Map getRoleInfo(String userId);
}

+ 45
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/service/impl/TbUserRoleServiceImpl.java View File

@ -0,0 +1,45 @@
package org.jeecg.modules.userRole.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.userRole.entity.TbUserRole;
import org.jeecg.modules.userRole.mapper.TbUserRoleMapper;
import org.jeecg.modules.userRole.service.ITbUserRoleService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.HashMap;
import java.util.Map;
/**
* @Description: 角色表
* @Author: jeecg-boot
* @Date: 2024-10-16
* @Version: V1.0
*/
@Service
public class TbUserRoleServiceImpl extends ServiceImpl<TbUserRoleMapper, TbUserRole> implements ITbUserRoleService {
@Override
public Map getRoleInfo(String userId) {
LambdaQueryWrapper<TbUserRole> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(TbUserRole::getUserId, userId).
eq(TbUserRole::getRole, 0).eq(TbUserRole::getAuditStatus, 1);
TbUserRole boss = this.getOne(queryWrapper1);
LambdaQueryWrapper<TbUserRole> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.eq(TbUserRole::getUserId, userId).
eq(TbUserRole::getRole, 1).eq(TbUserRole::getAuditStatus, 1);
TbUserRole company = this.getOne(queryWrapper2);
Map<String, TbUserRole> map = new HashMap<>();
// 返回用人方个人身份信息
map.put("boss", boss);
// 返回用人方企业身份信息
map.put("company", company);
return map;
}
}

+ 278
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/TbUserRoleList.vue View File

@ -0,0 +1,278 @@
<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="角色信息 1供应商 2采购商">
<j-dict-select-tag placeholder="请选择角色信息 1供应商 2采购商" v-model="queryParam.role" dictCode="user_role"/>
</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.userName"></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.companyName"></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.phone"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="审核状态 0审核中 1 审核通过 2审核未通过">
<j-dict-select-tag placeholder="请选择审核状态 0审核中 1 审核通过 2审核未通过" v-model="queryParam.auditStatus" dictCode="audit_status"/>
</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,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>
<tb-user-role-modal ref="modalForm" @ok="modalFormOk"></tb-user-role-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TbUserRoleModal from './modules/TbUserRoleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'TbUserRoleList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TbUserRoleModal
},
data () {
return {
description: '角色表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'角色信息 1供应商 2采购商',
align:"center",
dataIndex: 'role_dictText'
},
{
title:'用户名',
align:"center",
dataIndex: 'userName'
},
{
title:'公司名称',
align:"center",
dataIndex: 'companyName'
},
{
title:'税收编码',
align:"center",
dataIndex: 'taxCode'
},
{
title:'公司地址',
align:"center",
dataIndex: 'address'
},
{
title:'公司账号',
align:"center",
dataIndex: 'bankAccount'
},
{
title:'电话',
align:"center",
dataIndex: 'phone'
},
{
title:'开户行',
align:"center",
dataIndex: 'bankNama'
},
{
title:'营业执照上传',
align:"center",
dataIndex: 'businessLicense',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'基本户信息照片上传',
align:"center",
dataIndex: 'basicAccount',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'收款银行照片上传',
align:"center",
dataIndex: 'bankInfo',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'审核状态 0审核中 1 审核通过 2审核未通过',
align:"center",
dataIndex: 'auditStatus_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/userRole/tbUserRole/list",
delete: "/userRole/tbUserRole/delete",
deleteBatch: "/userRole/tbUserRole/deleteBatch",
exportXlsUrl: "/userRole/tbUserRole/exportXls",
importExcelUrl: "userRole/tbUserRole/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'int',value:'role',text:'角色信息 1供应商 2采购商',dictCode:'user_role'})
fieldList.push({type:'string',value:'userName',text:'用户名',dictCode:''})
fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''})
fieldList.push({type:'string',value:'taxCode',text:'税收编码',dictCode:''})
fieldList.push({type:'string',value:'address',text:'公司地址',dictCode:''})
fieldList.push({type:'string',value:'bankAccount',text:'公司账号',dictCode:''})
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'bankNama',text:'开户行',dictCode:''})
fieldList.push({type:'Text',value:'businessLicense',text:'营业执照上传',dictCode:''})
fieldList.push({type:'Text',value:'basicAccount',text:'基本户信息照片上传',dictCode:''})
fieldList.push({type:'Text',value:'bankInfo',text:'收款银行照片上传',dictCode:''})
fieldList.push({type:'int',value:'auditStatus',text:'审核状态 0审核中 1 审核通过 2审核未通过',dictCode:'audit_status'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 159
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleForm.vue View File

@ -0,0 +1,159 @@
<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="角色信息 1供应商 2采购商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="role">
<j-dict-select-tag type="list" v-model="model.role" dictCode="user_role" placeholder="请选择角色信息 1供应商 2采购商" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
<a-input v-model="model.userName" placeholder="请输入用户名" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName">
<a-input v-model="model.companyName" placeholder="请输入公司名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="税收编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taxCode">
<a-input v-model="model.taxCode" placeholder="请输入税收编码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入公司地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankAccount">
<a-input v-model="model.bankAccount" placeholder="请输入公司账号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input v-model="model.phone" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankNama">
<a-input v-model="model.bankNama" placeholder="请输入开户行" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="营业执照上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="businessLicense">
<j-image-upload isMultiple v-model="model.businessLicense" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="基本户信息照片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="basicAccount">
<j-image-upload isMultiple v-model="model.basicAccount" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="收款银行照片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankInfo">
<j-image-upload isMultiple v-model="model.bankInfo" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="审核状态 0审核中 1 审核通过 2审核未通过" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus">
<j-dict-select-tag type="list" v-model="model.auditStatus" dictCode="audit_status" placeholder="请选择审核状态 0审核中 1 审核通过 2审核未通过" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TbUserRoleForm',
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: "/userRole/tbUserRole/add",
edit: "/userRole/tbUserRole/edit",
queryById: "/userRole/tbUserRole/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

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

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tb-user-role-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-user-role-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 TbUserRoleForm from './TbUserRoleForm'
export default {
name: 'TbUserRoleModal',
components: {
TbUserRoleForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue/modules/TbUserRoleModal.vue View File

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

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

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/userRole/tbUserRole/list',
save='/userRole/tbUserRole/add',
edit='/userRole/tbUserRole/edit',
deleteOne = '/userRole/tbUserRole/delete',
deleteBatch = '/userRole/tbUserRole/deleteBatch',
importExcel = '/userRole/tbUserRole/importExcel',
exportXls = '/userRole/tbUserRole/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});
}

+ 184
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/userRole/vue3/TbUserRole.data.ts View File

@ -0,0 +1,184 @@
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: '角色信息 1供应商 2采购商',
align:"center",
dataIndex: 'role_dictText'
},
{
title: '用户名',
align:"center",
dataIndex: 'userName'
},
{
title: '公司名称',
align:"center",
dataIndex: 'companyName'
},
{
title: '税收编码',
align:"center",
dataIndex: 'taxCode'
},
{
title: '公司地址',
align:"center",
dataIndex: 'address'
},
{
title: '公司账号',
align:"center",
dataIndex: 'bankAccount'
},
{
title: '电话',
align:"center",
dataIndex: 'phone'
},
{
title: '开户行',
align:"center",
dataIndex: 'bankNama'
},
{
title: '营业执照上传',
align:"center",
dataIndex: 'businessLicense',
customRender:render.renderAvatar,
},
{
title: '基本户信息照片上传',
align:"center",
dataIndex: 'basicAccount',
customRender:render.renderAvatar,
},
{
title: '收款银行照片上传',
align:"center",
dataIndex: 'bankInfo',
customRender:render.renderAvatar,
},
{
title: '审核状态 0审核中 1 审核通过 2审核未通过',
align:"center",
dataIndex: 'auditStatus_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
{
label: "角色信息 1供应商 2采购商",
field: "role",
component: 'JDictSelectTag',
componentProps:{
dictCode:"user_role"
},
colProps: {span: 6},
},
{
label: "用户名",
field: "userName",
component: 'Input',
colProps: {span: 6},
},
{
label: "公司名称",
field: "companyName",
component: 'Input',
colProps: {span: 6},
},
{
label: "电话",
field: "phone",
component: 'Input',
colProps: {span: 6},
},
{
label: "审核状态 0审核中 1 审核通过 2审核未通过",
field: "auditStatus",
component: 'JDictSelectTag',
componentProps:{
dictCode:"audit_status"
},
colProps: {span: 6},
},
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '角色信息 1供应商 2采购商',
field: 'role',
component: 'JDictSelectTag',
componentProps:{
dictCode:"user_role"
},
},
{
label: '用户名',
field: 'userName',
component: 'Input',
},
{
label: '公司名称',
field: 'companyName',
component: 'Input',
},
{
label: '税收编码',
field: 'taxCode',
component: 'Input',
},
{
label: '公司地址',
field: 'address',
component: 'Input',
},
{
label: '公司账号',
field: 'bankAccount',
component: 'Input',
},
{
label: '电话',
field: 'phone',
component: 'Input',
},
{
label: '开户行',
field: 'bankNama',
component: 'Input',
},
{
label: '营业执照上传',
field: 'businessLicense',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '基本户信息照片上传',
field: 'basicAccount',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '收款银行照片上传',
field: 'bankInfo',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '审核状态 0审核中 1 审核通过 2审核未通过',
field: 'auditStatus',
component: 'JDictSelectTag',
componentProps:{
dictCode:"audit_status"
},
},
];

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

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

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

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../tbUserRole.data';
import {saveOrUpdate} from '../tbUserRole.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>

+ 79
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/postBean/ReqUserRole.java View File

@ -0,0 +1,79 @@
package org.jeecg.modules.postBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
/**
* @Description: 角色表
* @Author: jeecg-boot
* @Date: 2024-10-16
* @Version: V1.0
*/
@Data
@ApiModel(value="选择身份对象", description="选择身份对象")
public class ReqUserRole implements Serializable {
private static final long serialVersionUID = 1L;
/**用人方企业 1 用人方个人 0*/
@Excel(name = "用人方企业 1 用人方个人 0", width = 15, dicCode = "user_role")
@Dict(dicCode = "user_role")
@ApiModelProperty(value = "用人方企业 1 用人方个人 0")
private Integer role;
/**用户名*/
@Excel(name = "用户名", width = 15)
@ApiModelProperty(value = "用户名")
private String userName;
@ApiModelProperty(value = "行业")
private String industry;
// @ApiModelProperty(value = "密码")
// private String password;
/**公司名称*/
@Excel(name = "公司名称", width = 15)
@ApiModelProperty(value = "公司名称")
private String companyName;
// /**税收编码*/
// @Excel(name = "税收编码", width = 15)
// @ApiModelProperty(value = "税收编码")
// private String taxCode;
/**公司地址*/
@Excel(name = "公司地址", width = 15)
@ApiModelProperty(value = "公司地址")
private String address;
// /**公司账号*/
// @Excel(name = "公司账号", width = 15)
// @ApiModelProperty(value = "公司账号")
// private String bankAccount;
// /**电话*/
// @Excel(name = "电话", width = 15)
// @ApiModelProperty(value = "电话")
// private String phone;
// /**开户行*/
// @Excel(name = "开户行", width = 15)
// @ApiModelProperty(value = "开户行")
// private String bankNama;
/**营业执照上传*/
@Excel(name = "营业执照上传", width = 15)
@ApiModelProperty(value = "营业执照上传")
private String businessLicense;
// /**基本户信息照片上传*/
// @Excel(name = "基本户信息照片上传", width = 15)
// @ApiModelProperty(value = "基本户信息照片上传")
// private String basicAccount;
// /**收款银行照片上传*/
// @Excel(name = "收款银行照片上传", width = 15)
// @ApiModelProperty(value = "收款银行照片上传")
// private String bankInfo;
// /**审核状态 0审核中 1 审核通过 2审核未通过*/
// @Excel(name = "审核状态 0审核中 1 审核通过 2审核未通过", width = 15, dicCode = "audit_status")
// @Dict(dicCode = "audit_status")
// @ApiModelProperty(value = "审核状态 0审核中 1 审核通过 2审核未通过")
// private Integer auditStatus;
}

+ 0
- 35
jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/controller/UserController.java View File

@ -1,35 +0,0 @@
package org.jeecg.modules.user.controller;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.modules.user.service.AppletLoginService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 服务化 system模块 对外接口请求类
* @author: jeecg-boot
*/
@Slf4j
@RestController
@RequestMapping("/user/")
public class UserController {
@Resource
private AppletLoginService appletLoginService;
//小程序授权登录
@ApiOperation(value="小程序-登录接口", notes="小程序-登录接口")
@GetMapping("/login")
public Result<?> login(LoginReq loginReq){
return appletLoginService.appletLogin(loginReq);
}
}

jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/controller/IndexController.java → jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/IndexController.java View File

@ -1,30 +1,23 @@
package org.jeecg.modules.user.controller;
package org.jeecg.modules.userCode.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.xkcoding.http.HttpUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.user.service.IndexService;
import org.jeecg.modules.userCode.service.IndexService;
import org.jeecg.modules.banner.entity.WebBanner;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.postBean.SuggestReq;
import org.jeecg.modules.tbSuggest.entity.TbSuggest;
import org.jeecg.modules.tbSuggest.service.ITbSuggestService;
import org.jeecg.modules.utils.ValidateTool;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author scott

+ 51
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/controller/UserController.java View File

@ -0,0 +1,51 @@
package org.jeecg.modules.userCode.controller;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.modules.postBean.ReqUserRole;
import org.jeecg.modules.userCode.service.AppletLoginService;
import org.jeecg.modules.utils.ValidateTool;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 服务化 system模块 对外接口请求类
*
* @author: jeecg-boot
*/
@Slf4j
@RestController
@RequestMapping("/user/")
@Api(tags = "登陆选择身份等接口")
public class UserController {
@Resource
private AppletLoginService appletLoginService;
//小程序授权登录
@ApiOperation(value = "小程序-登录接口", notes = "小程序-登录接口")
@GetMapping("/login")
public Result<?> login(LoginReq loginReq) {
return appletLoginService.appletLogin(loginReq);
}
@ApiOperation(value = "选择身份")
@RequestMapping(value = "/role", method = RequestMethod.POST)
public Result<JSONObject> role(@RequestBody ReqUserRole reqUserRole, @RequestHeader("X-Access-Token") String token) {
if (ValidateTool.isNull(reqUserRole)) {
return Result.error("参数错误");
}
return appletLoginService.role(reqUserRole,token);
}
}

jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/service/AppletLoginService.java → jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/AppletLoginService.java View File

@ -1,15 +1,19 @@
package org.jeecg.modules.user.service;
package org.jeecg.modules.userCode.service;
import com.alibaba.fastjson.JSONObject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.modules.postBean.ReqUserRole;
public interface AppletLoginService {
/**
* 微信小程序登录接口
*
* @param loginReq
* @return
*/
Result<Object> appletLogin(LoginReq loginReq);
Result<JSONObject> role(ReqUserRole reqUserRole, String token);
}

jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/service/IndexService.java → jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/IndexService.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.user.service;
package org.jeecg.modules.userCode.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.banner.entity.WebBanner;

jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/service/impl/AppletLoginServiceImpl.java → jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/AppletLoginServiceImpl.java View File

@ -1,17 +1,24 @@
package org.jeecg.modules.user.service.impl;
package org.jeecg.modules.userCode.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.bean.HttpConf;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.user.service.AppletLoginService;
import org.jeecg.modules.postBean.ReqUserRole;
import org.jeecg.modules.userCode.service.AppletLoginService;
import org.jeecg.modules.userRole.entity.TbUserRole;
import org.jeecg.modules.userRole.service.ITbUserRoleService;
import org.jeecg.modules.utils.ValidateTool;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -30,7 +37,8 @@ public class AppletLoginServiceImpl implements AppletLoginService {
@Value("${wechat.mpAppSecret}")
private String mpAppSecret;
@Resource
private ShiroRealm shiroRealm;
@Resource
private IHanHaiMemberService memberService;
@ -39,6 +47,8 @@ public class AppletLoginServiceImpl implements AppletLoginService {
private RedisUtil redisUtil;
@Resource
private HttpConf httpConf;
@Resource
private ITbUserRoleService tbUserRoleService;
@ -82,7 +92,10 @@ public class AppletLoginServiceImpl implements AppletLoginService {
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME / 100);
map.put("userInfo", member);
map.put("token", token);
//返回身份角色信息 新账号没有身份
map.put("boss", null);
map.put("company", null);
map.put("worker", null);
result.setCode(200);
result.setResult(map);
return result;
@ -95,6 +108,11 @@ public class AppletLoginServiceImpl implements AppletLoginService {
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
// 设置超时时间
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME / 100);
Map roleInfo = tbUserRoleService.getRoleInfo(member.getId());
//返回身份角色信息
map.put("boss", roleInfo.get("boss"));
map.put("company", roleInfo.get("company"));
map.put("worker", null);
map.put("userInfo", member);
map.put("token", token);
//用户id做im账号
@ -109,6 +127,37 @@ public class AppletLoginServiceImpl implements AppletLoginService {
// return result;
// }
}
return result;
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result<JSONObject> role(ReqUserRole reqUserRole, String token) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(token);
Result<JSONObject> result = new Result<JSONObject>();
//getAuditStatus 0审核中 1 审核通过 2审核未通过
LambdaQueryWrapper<TbUserRole> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
objectLambdaQueryWrapper.eq(TbUserRole::getUserId,hanHaiMember.getId()).
eq(TbUserRole::getRole,reqUserRole.getRole()).in(TbUserRole::getAuditStatus,1,0);
TbUserRole one1 = tbUserRoleService.getOne(objectLambdaQueryWrapper);
if (ValidateTool.isNotNull(one1) && one1.getAuditStatus()==0){
return result.error500("已提交审核,请耐心等候或联系管理员");
}
if (ValidateTool.isNotNull(one1) && one1.getAuditStatus()==1){
return result.error500("已提交审核,请勿重复提交");
}
TbUserRole tbUserRole = new TbUserRole();
BeanUtils.copyProperties(reqUserRole, tbUserRole);
tbUserRole.setUserId(hanHaiMember.getId());
tbUserRole.setAuditStatus(0);
tbUserRoleService.save(tbUserRole);
JSONObject obj = new JSONObject();
obj.put("role", tbUserRole);
result.setResult(obj);
result.setCode(CommonConstant.SC_OK_200);
return result;
}

jeecg-boot-module-system/src/main/java/org/jeecg/modules/user/service/impl/IndexServiceImpl.java → jeecg-boot-module-system/src/main/java/org/jeecg/modules/userCode/service/impl/IndexServiceImpl.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.user.service.impl;
package org.jeecg.modules.userCode.service.impl;
import com.alibaba.fastjson.JSONObject;
@ -11,7 +11,8 @@ import org.jeecg.modules.banner.service.IWebBannerService;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.tbConf.entity.TbConf;
import org.jeecg.modules.tbConf.service.ITbConfService;
import org.jeecg.modules.user.service.IndexService;
import org.jeecg.modules.userCode.service.IndexService;
import org.jeecg.modules.userRole.service.ITbUserRoleService;
import org.jeecg.modules.utils.ValidateTool;
import org.springframework.stereotype.Service;
@ -31,8 +32,8 @@ public class IndexServiceImpl implements IndexService {
private ITbConfService tbConfService;
@Resource
private ShiroRealm shiroRealm;
// @Resource
// private ITbUserRoleService tbUserRoleService;
@Resource
private ITbUserRoleService tbUserRoleService;
@Resource
private RedisUtil redisUtil;
@ -47,25 +48,13 @@ public class IndexServiceImpl implements IndexService {
//平台客户电话号码
jsonObject.put("phone", ValidateTool.isNull(one) ? "19198239116" : one.getValue());
jsonObject.put("my", hanHaiMember);
//清关背景图
QueryWrapper<TbConf> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("name", "sys_pic_qg");
TbConf pic = tbConfService.getOne(queryWrapper);
jsonObject.put("pic", ValidateTool.isNull(pic) ? "https://dianpin-img.xzaiyp.top/temp/组478612x_1730704228537.png" : pic.getValue());
// LambdaQueryWrapper<TbUserRole> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
// objectLambdaQueryWrapper.eq(TbUserRole::getUserId, hanHaiMember.getId()).
// eq(TbUserRole::getRole, 0).eq(TbUserRole::getAuditStatus, 1);
// TbUserRole cg = tbUserRoleService.getOne(objectLambdaQueryWrapper);
// LambdaQueryWrapper<TbUserRole> queryWrapper1 = new LambdaQueryWrapper<>();
// queryWrapper1.eq(TbUserRole::getUserId, hanHaiMember.getId()).
// eq(TbUserRole::getRole, 1).eq(TbUserRole::getAuditStatus, 1);
// TbUserRole shop = tbUserRoleService.getOne(queryWrapper1);
//// 返回采购商身份信息
// jsonObject.put("buy", cg);
//// 返回供应商身份信息
// jsonObject.put("shop", shop);
Map roleInfo = tbUserRoleService.getRoleInfo(hanHaiMember.getId());
// 返回用人方个人身份信息
jsonObject.put("boss", roleInfo.get("boss"));
// 返回用人方企业身份信息
jsonObject.put("company", roleInfo.get("company"));
return Result.OK(jsonObject);
}

+ 3
- 3
jeecg-boot-module-system/src/main/resources/application-dev.yml View File

@ -7,7 +7,7 @@ server:
include-stacktrace: ALWAYS
include-message: ALWAYS
servlet:
context-path: /employ-admin
context-path: /employ-api
compression:
enabled: true
min-response-size: 1024
@ -331,8 +331,8 @@ third-app:
#配置微信
wechat:
mpAppId: wxe631bce44d54667e
mpAppSecret: 2f19c405ea9bb523f350b5a9fd01b878
mpAppId: wx6931d85f7371b032
mpAppSecret: 4bc2d5bdfec7023818ece6ee41613f18
mchId:
mchKey:
keyPath: /usr/local/cert/apiclient_cert.p12


+ 2
- 2
jeecg-boot-module-system/src/main/resources/application-prod.yml View File

@ -7,7 +7,7 @@ server:
include-stacktrace: ALWAYS
include-message: ALWAYS
servlet:
context-path: /employ-admin
context-path: /employ-api
compression:
enabled: true
min-response-size: 1024
@ -136,7 +136,7 @@ spring:
master:
url: jdbc:mysql://8.138.162.67:3306/employ2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&autoReconnect=true&failOverReadOnly=false
username: root
password: Fk4q*h@V
password: F^E5!Kfd
driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
#multi-datasource1:


Loading…
Cancel
Save