| @ -1,5 +1,5 @@ | |||
| NODE_ENV=production | |||
| VUE_APP_PLATFORM_NAME=用工小程序 | |||
| VUE_APP_PLATFORM_NAME=铝材交易后台管理系统 | |||
| # 开启单点登录 | |||
| VUE_APP_SSO=false | |||
| # 开启微应用模式 | |||
| @ -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,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 | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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); | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| @ -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> { | |||
| } | |||
| @ -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> | |||
| @ -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); | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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> | |||
| @ -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}); | |||
| } | |||
| @ -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" | |||
| }, | |||
| }, | |||
| ]; | |||
| @ -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> | |||
| @ -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> | |||
| @ -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; | |||
| } | |||
| @ -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); | |||
| } | |||
| } | |||
| @ -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 | |||
| @ -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); | |||
| } | |||
| } | |||
| @ -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); | |||
| } | |||
| @ -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; | |||