Merge remote-tracking branch 'origin/master'
| | |
| | | ``` |
| | | "highlight.js": "10.7.3", |
| | | |
| | | |
| | | ## 路由文件名称 |
| | | # 库存管理/出入库管理 |
| | | <!-- 出库管理 --> |
| | | /stock/accessStock/outbound |
| | | <!-- 出入库明细 --> |
| | | /stock/accessStock/outboundDetails |
| | | # 库存管理/采购管理 |
| | | <!-- 采购单 --> |
| | | /stock/procure/purchaseOrder |
| | | <!-- 采购入库明细 --> |
| | | /stock/procure/receiptDetails |
| | | # 库存管理/调拨管理 |
| | | <!-- 调拨申请 --> |
| | | /stock/transfer/transferApplication |
| | | <!-- 调拨出库 --> |
| | | /stock/transfer/transferissue |
| | | <!-- 调拨明细 --> |
| | | /stock/transfer/transferdetails |
| | | # 库存管理/库存盘点 |
| | | <!-- 盘点任务 --> |
| | | /stock/inventorycount/inventorytask |
| | | <!-- 异常明细 --> |
| | | /stock/inventorycount/exceptionDetails |
| | | # 库存管理/报废管理 |
| | | <!-- 物品报废 --> |
| | | /stock/scrap/itemScrapping |
| | | <!-- 报废明细 --> |
| | | /stock/scrap/scrapDetails |
| | | # 库存管理/台账查询 |
| | | <!-- 库存查询 --> |
| | | /stock/ledger/inventoryQuery |
| | | <!-- 库存预警设置 --> |
| | | /stock/ledger/inventoryAlert |
| | | <!-- 预警查询 --> |
| | | /stock/ledger/alertQuery |
| | | <!-- 台账查询 --> |
| | | /stock/ledger/ledgerQuery |
| | | # 部门物品管理/物品分发 |
| | | <!-- 物品分发 --> |
| | | /departmentitem/itemdis/distribution |
| | | <!-- 分发明细 --> |
| | | /departmentitem/itemdis/disDetails |
| | | # 部门物品管理/物品退回 |
| | | <!-- 退回单 --> |
| | | /departmentitem/itemret/returnNote |
| | | <!-- 退回明细 --> |
| | | /departmentitem/itemret/retDetails |
| | | # 部门物品管理/物品报废 |
| | | <!-- 物品报废 --> |
| | | /departmentitem/itemscr/scrapping |
| | | <!-- 报废明细 --> |
| | | /departmentitem/itemscr/scrappDetails |
| | | # 部门物品管理/台账查询 |
| | | <!-- 物品查询 --> |
| | | /departmentitem/ledgerquy/itemQuy |
| | | <!-- 台账查询 --> |
| | | /departmentitem/ledgerquy/ledQuy |
| | | # 统计报表 |
| | | <!-- 物品统计表 --> |
| | | /statisticalreport/itemReport |
| | |
| | | // 服务器地址 |
| | | httpUrl: VUE_APP_API_URL, |
| | | // 上传路径 |
| | | ftpUrl: 'http://172.16.60.209:8082/progress',//开发 |
| | | ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // ftpUrl:'https://jmy.jinmingyuan.com/progress',// 测试, |
| | | // 接口请求地址 |
| | | // apiBaseURL: 'http://116.198.39.83:8082/progress', // 正式 |
| | | apiBaseURL: 'http://172.16.60.90:8082/progress',//开发 |
| | | // apiBaseURL: 'http://172.16.60.90:8082/progress',//开发 |
| | | apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试, |
| | | // socket连接 |
| | | wsSocketUrl: VUE_APP_WS_URL, |
| | |
| | | */ |
| | | search(param) { |
| | | this.$nextTick(() => { |
| | | this.myTable.loading = true |
| | | // this.myTable.loading = true |
| | | const params = Object.assign({}, this.filter) |
| | | if(this.myTable.paging.show){ |
| | | params.pageSize = this.myTable.paging.page.pageSize |
| | |
| | | // 服务器地址 |
| | | httpUrl: VUE_APP_API_URL, |
| | | // 上传路径 |
| | | ftpUrl: 'http://172.16.60.209:8082/progress',//开发 |
| | | ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // ftpUrl:'https://jmy.jinmingyuan.com/progress',// 测试, |
| | | // 接口请求地址 |
| | | // apiBaseURL: 'http://116.198.39.83:8082/progress', // 正式 |
| | | apiBaseURL: 'http://172.16.60.90:8082/progress',//开发 |
| | | // apiBaseURL: 'http://172.16.60.90:8082/progress',//开发 |
| | | apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // apiBaseURL: 'https://jmy.jinmingyuan.com/progress',// 测试, |
| | | // socket连接 |
| | | wsSocketUrl: VUE_APP_WS_URL, |
New file |
| | |
| | | <template> |
| | | <win-sm :title="setting.title" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="上级分类" prop="code"> |
| | | <el-input v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="分类名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="类别" prop="name"> |
| | | <!-- <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> --> |
| | | <el-select v-model="formData.planTypeCode" placeholder="" clearable style="width: 100%"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.code" |
| | | :label="item.label" |
| | | :value="item.code"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="顺序" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-switch |
| | | v-model="formData.status" |
| | | active-color="#0d997c" |
| | | inactive-color="#C0CCDA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="取消" site="form" @click="close"/> |
| | | <my-button name="保存" site="form" @click="save"/> |
| | | </div> |
| | | </win-sm> |
| | | </template> |
| | | |
| | | <script> |
| | | import winSm from '@/components/win/win-sm' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | |
| | | export default { |
| | | components: {winSm, myButton}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkAll: false, |
| | | checkedList: [], |
| | | options:[ |
| | | { |
| | | code: 1, |
| | | label:'A' |
| | | }, |
| | | { |
| | | code: 2, |
| | | label:'B' |
| | | }, |
| | | { |
| | | code: 3, |
| | | label:'C' |
| | | } |
| | | ], |
| | | formData: { |
| | | code: '', |
| | | name: '', |
| | | status: true, |
| | | summary: '', |
| | | planTypeCode:'' |
| | | }, |
| | | rules: { |
| | | code: [ |
| | | {required: true, message: '请输入机构编号', trigger: 'blur'} |
| | | ], |
| | | name: [ |
| | | {required: true, message: '请输入机构名称', trigger: 'blur'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if(this.setting.info){ |
| | | this.formData = Object.assign({},JSON.parse(this.setting.info)) |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditInfo(id){ |
| | | |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData) |
| | | if(this.setting.id){ |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.add(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message.error('校验未通过,请检查。') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-card shadow="never" style="width: 240px;margin-right: 15px"> |
| | | <my-tree ref="searchTree" :tree-list="treeDataList" @setNode="nodeClick" @search="search"></my-tree> |
| | | </el-card> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import myTree from '@/components/myTree/index' |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import items from './items' |
| | | import edit from './edit' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {updStatus} from "@/api/baseSetting/finsystenant"; |
| | | import {getBaseUrl, getUploadUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, edit, myTree, myImport}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: items, |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | { |
| | | name: '新增', |
| | | click: () => { |
| | | this.showAdd(null); |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '分类名称', field: 'category_Name', align: 'center'}, |
| | | {title: '类别', field: 'classification', align: 'left'}, |
| | | {title: '显示顺序', field: 'order_Number', align: 'center', width: '80px'}, |
| | | { |
| | | field: 'states', |
| | | title: '状态', |
| | | align: 'center', |
| | | width: 100, |
| | | switch: row => { |
| | | const result = {} |
| | | if (row.status == 1) { |
| | | Object.assign(result, { |
| | | value: true, // 开 |
| | | label: '是', // 开的描述 |
| | | click: () => { // 点击事件 |
| | | this.updState(row) |
| | | } |
| | | }) |
| | | } else { |
| | | Object.assign(result, { |
| | | value: false, // 关 |
| | | label: '否', // 关的描述 |
| | | click: () => { |
| | | this.updState(row) |
| | | } |
| | | }) |
| | | } |
| | | return result |
| | | } |
| | | } |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '编辑', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '删除', |
| | | events: (row) => { |
| | | this.del(row); |
| | | }, |
| | | } |
| | | ], |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | // 获取机构树 |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then(res => { |
| | | const content = res || [] |
| | | this.treeDataList.splice(0, this.treeDataList.length) |
| | | this.treeDataList = content |
| | | if (content.length > 0) { |
| | | this.importSetting.fileSettings.data = {pid: content[0].id} |
| | | } |
| | | }) |
| | | }, |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | nodeClick(param) { |
| | | param = param || {} |
| | | this.p = Object.assign({}, { |
| | | id: param.id, |
| | | name: param.name |
| | | }) |
| | | if (this.p.id != undefined && this.p.id != null) { |
| | | this.filterFrom.tenantId = this.p.id |
| | | this.editSetting.orgId = this.p.id |
| | | } else { |
| | | this.filterFrom.tenantId = null |
| | | this.editSetting.orgId = null |
| | | } |
| | | this.importSetting.fileSettings.data = {pid: param.id} |
| | | this.search(1) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | export default [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '分类名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: 'A', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: '3' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0' |
| | | } |
| | | ] |
| | | } |
| | | ] |
New file |
| | |
| | | <template> |
| | | <win-md :title="setting.title" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="物品编号"> |
| | | <el-input v-model="formData.code88" disabled clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="物品名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item style="margin-left: -100px;" v-for="(m, i) in formData.code"> |
| | | <el-form-item label="规格型号" prop="name" style="float: left;"> |
| | | <el-input v-model="m.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="单位" prop="name" style="float: left;"> |
| | | <el-input v-model="m.code" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <my-button name="新增型号" type="" @click="addCode"/> |
| | | <my-button name="删除" type="" @click="delCode(i)"/> |
| | | </el-form-item> |
| | | <el-form-item label="状态"> |
| | | <el-switch |
| | | v-model="formData.status" |
| | | active-color="#0d997c" |
| | | inactive-color="#C0CCDA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="取消" site="form" @click="close"/> |
| | | <my-button name="保存" site="form" @click="save"/> |
| | | </div> |
| | | </win-md> |
| | | </template> |
| | | |
| | | <script> |
| | | import winMd from '@/components/win/win-md' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | |
| | | export default { |
| | | components: {winMd, myButton}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkAll: false, |
| | | checkedList: [], |
| | | formData: { |
| | | radio1: '', |
| | | code: '', |
| | | name: '', |
| | | status: true, |
| | | summary: '', |
| | | code:[ |
| | | { |
| | | name:'12', |
| | | code:'13' |
| | | }, |
| | | ] |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: '请输入物品名称', trigger: 'blur'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if(this.setting.info){ |
| | | this.formData = Object.assign({},JSON.parse(this.setting.info)) |
| | | } |
| | | }, |
| | | methods: { |
| | | addCode(){ |
| | | this.formData.code.push( |
| | | { |
| | | name:'', |
| | | code:'' |
| | | } |
| | | ) |
| | | }, |
| | | delCode(index){ |
| | | this.formData.code.splice(index, 1) |
| | | }, |
| | | getEditInfo(id){ |
| | | |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData) |
| | | if(this.setting.id){ |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.add(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message.error('校验未通过,请检查。') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import myTree from '@/components/myTree/index' |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import edit from './edit' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, edit, myTree, myImport}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goods_Name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goods_Code', |
| | | label: '物品编号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: 'A', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'B', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: 'C', |
| | | value: '3' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '采购类别', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '全部', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '自采', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: '集采', |
| | | value: '3' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0' |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | { |
| | | name: '新增', |
| | | click: () => { |
| | | this.showAdd(null); |
| | | }, |
| | | }, |
| | | { |
| | | name: '导入', |
| | | click: () => { |
| | | this.importOrg(); |
| | | }, |
| | | } |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '物品编号', field: 'goods_Code', align: 'center'}, |
| | | {title: '物品名称', field: 'goods_Name', align: 'center'}, |
| | | {title: '分类', field: 'classification', align: 'center'}, |
| | | {title: '类别', field: 'states', align: 'center'}, |
| | | {title: '采购类型', field: 'category_id', align: 'center'}, |
| | | {title: '所属机构', field: 'agency_Name', align: 'center'}, |
| | | { |
| | | title: '创建时间', |
| | | field: 'create_Date', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return {value: DateFormatter.LongToDateTime(row.create_Date)}; |
| | | }, |
| | | }, |
| | | { |
| | | field: 'states', |
| | | title: '状态', |
| | | align: 'center', |
| | | width: 100, |
| | | switch: row => { |
| | | const result = {} |
| | | if (row.status == 1) { |
| | | Object.assign(result, { |
| | | value: true, // 开 |
| | | label: '是', // 开的描述 |
| | | click: () => { // 点击事件 |
| | | this.updState(row) |
| | | } |
| | | }) |
| | | } else { |
| | | Object.assign(result, { |
| | | value: false, // 关 |
| | | label: '否', // 关的描述 |
| | | click: () => { |
| | | this.updState(row) |
| | | } |
| | | }) |
| | | } |
| | | return result |
| | | } |
| | | } |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '编辑', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '删除', |
| | | events: (row) => { |
| | | this.del(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '规格型号', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <win-sm :title="setting.title" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="编号" prop="code"> |
| | | <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="地址" > |
| | | <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-switch |
| | | v-model="formData.status" |
| | | active-color="#0d997c" |
| | | inactive-color="#C0CCDA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="取消" site="form" @click="close"/> |
| | | <my-button name="保存" site="form" @click="save"/> |
| | | </div> |
| | | </win-sm> |
| | | </template> |
| | | |
| | | <script> |
| | | import winSm from '@/components/win/win-sm' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | |
| | | export default { |
| | | components: {winSm, myButton}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkAll: false, |
| | | checkedList: [], |
| | | formData: { |
| | | code: '', |
| | | name: '', |
| | | status: true, |
| | | summary: '', |
| | | }, |
| | | rules: { |
| | | code: [ |
| | | {required: true, message: '请输入机构编号', trigger: 'blur'} |
| | | ], |
| | | name: [ |
| | | {required: true, message: '请输入机构名称', trigger: 'blur'} |
| | | ], |
| | | status: [ |
| | | {required: true, message: '请选择状态', trigger: 'blur'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if(this.setting.info){ |
| | | this.formData = Object.assign({},JSON.parse(this.setting.info)) |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditInfo(id){ |
| | | |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData) |
| | | if(this.setting.id){ |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.add(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message.error('校验未通过,请检查。') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import edit from './edit' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, edit, myImport}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '仓库名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0' |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | { |
| | | name: '新增', |
| | | click: () => { |
| | | this.showAdd(null); |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '名称仓库', field: 'name', align: 'left',}, |
| | | {title: '编号', field: 'code', align: 'center'}, |
| | | {title: '类型', field: 'lv', align: 'center', }, |
| | | {title: '地址', field: 'lv', align: 'center', }, |
| | | {title: '所属机构', field: 'summary', align: 'left',}, |
| | | { |
| | | field: 'belongProvince', |
| | | title: '状态', |
| | | align: 'center', |
| | | width: 100, |
| | | switch: row => { |
| | | const result = {} |
| | | if (row.status == 1) { |
| | | Object.assign(result, { |
| | | value: true, // 开 |
| | | label: '是', // 开的描述 |
| | | click: () => { // 点击事件 |
| | | this.updState(row) |
| | | } |
| | | }) |
| | | } else { |
| | | Object.assign(result, { |
| | | value: false, // 关 |
| | | label: '否', // 关的描述 |
| | | click: () => { |
| | | this.updState(row) |
| | | } |
| | | }) |
| | | } |
| | | return result |
| | | } |
| | | } |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '编辑', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '删除', |
| | | events: (row) => { |
| | | this.del(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '仓库员', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | } |
| | | ], |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | // 获取机构树 |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then(res => { |
| | | const content = res || [] |
| | | this.treeDataList.splice(0, this.treeDataList.length) |
| | | this.treeDataList = content |
| | | if (content.length > 0) { |
| | | this.importSetting.fileSettings.data = {pid: content[0].id} |
| | | } |
| | | }) |
| | | }, |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | nodeClick(param) { |
| | | param = param || {} |
| | | this.p = Object.assign({}, { |
| | | id: param.id, |
| | | name: param.name |
| | | }) |
| | | if (this.p.id != undefined && this.p.id != null) { |
| | | this.filterFrom.tenantId = this.p.id |
| | | this.editSetting.orgId = this.p.id |
| | | } else { |
| | | this.filterFrom.tenantId = null |
| | | this.editSetting.orgId = null |
| | | } |
| | | this.importSetting.fileSettings.data = {pid: param.id} |
| | | this.search(1) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-button name="新增" @click="addtable" site="form" /> |
| | | <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}"> |
| | | <el-row class="card" |
| | | :gutter="5"> |
| | | <el-col v-for="(item, index) in proData" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="hed-one">出库单号:{{ item.order_no }}</div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">机构:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">操作人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">出库时间:</span>{{ item.customer_name }}</div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.data" class="two-end"> |
| | | <div class="item"><span>{{ just.order_no }}:</span>{{ just.customer_name }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="card-but"> |
| | | <my-button name="查看详情" site="form" /> |
| | | <my-button name="导出出库单" site="form" /> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="1" |
| | | :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" |
| | | :page-size="10" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <el-dialog title="新增出库" :close-on-click-modal="false" :visible.sync="adddialog" width="60%" > |
| | | <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px"> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="出库手续" prop="name"> |
| | | 仅允许导入xls、xlsx格式文件 |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="position: relative;"> |
| | | <div style="background-color: #F9F9F9;width: 90%;"> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="formData.tableData" height="100%" :stripe="true"> |
| | | <el-table-column prop="projectName" label="规格型号" align="center"> </el-table-column> |
| | | <el-table-column prop="time1" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="unit" label="现有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="time2" label="出库数量" align="center"> </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="position: absolute;right: 0;top: 152px;"> |
| | | <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="移除" site="form"/> |
| | | <my-button name="新增物品" site="form"/> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="确定" site="form" /> |
| | | <my-button name="取消" site="form" @click="adddialog = false"/> |
| | | </div> |
| | | </el-dialog> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, myImport}, |
| | | data() { |
| | | return { |
| | | |
| | | adddialog: false, |
| | | formData:{ |
| | | tableData:[ |
| | | { |
| | | projectName:'555' |
| | | }, |
| | | { |
| | | projectName:'444' |
| | | } |
| | | ], |
| | | }, |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '出库单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '出库时间', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val2', |
| | | label: '至', |
| | | defaultValue: '' |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // dataIndex: 'status', |
| | | // label: '状态', |
| | | // placeholder: '请选择', |
| | | // defaultValue: '1', |
| | | // options: [ |
| | | // { |
| | | // label: '启用', |
| | | // value: '1' |
| | | // }, |
| | | // { |
| | | // label: '禁用', |
| | | // value: '0' |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | proData: [ |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | clientHeight () { |
| | | return document.documentElement.clientHeight |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | handleSizeChange(){}, |
| | | handleCurrentChange(){}, |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | |
| | | addtable() { |
| | | this.adddialog = true |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | // this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | // this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | console.log(params,'555'); |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .card { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin: 0px !important; |
| | | .cm-item { |
| | | width: 100%; |
| | | } |
| | | .cm-item /deep/ .el-card__body { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | .card-data{ |
| | | margin-top: 8px; |
| | | .card-container{ |
| | | display: inline-block; |
| | | width: 70%; |
| | | .hed-one{ |
| | | color: #2298EE; |
| | | font-size: 18px; |
| | | } |
| | | .one-hed{ |
| | | margin-top: 15px; |
| | | .box{ |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | .span-two{ |
| | | color: #83919e; |
| | | font-size: 14px; |
| | | } |
| | | .card-end{ |
| | | font-size: 14px; |
| | | color: #3d3d3d; |
| | | margin-top: 15px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | .two-end{ |
| | | width: calc(33.33% - 20px); |
| | | margin-bottom: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .card-but{ |
| | | display: inline-block; |
| | | } |
| | | .end{ |
| | | display: inline-block; |
| | | } |
| | | |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <win-sm :title="setting.title" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="编号" prop="code"> |
| | | <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="地址" > |
| | | <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-switch |
| | | v-model="formData.status" |
| | | active-color="#0d997c" |
| | | inactive-color="#C0CCDA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="取消" site="form" @click="close"/> |
| | | <my-button name="保存" site="form" @click="save"/> |
| | | </div> |
| | | </win-sm> |
| | | </template> |
| | | |
| | | <script> |
| | | import winSm from '@/components/win/win-sm' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | |
| | | export default { |
| | | components: {winSm, myButton}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkAll: false, |
| | | checkedList: [], |
| | | formData: { |
| | | code: '', |
| | | name: '', |
| | | status: true, |
| | | summary: '', |
| | | }, |
| | | rules: { |
| | | code: [ |
| | | {required: true, message: '请输入机构编号', trigger: 'blur'} |
| | | ], |
| | | name: [ |
| | | {required: true, message: '请输入机构名称', trigger: 'blur'} |
| | | ], |
| | | status: [ |
| | | {required: true, message: '请选择状态', trigger: 'blur'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if(this.setting.info){ |
| | | this.formData = Object.assign({},JSON.parse(this.setting.info)) |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditInfo(id){ |
| | | |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData) |
| | | if(this.setting.id){ |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.add(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message.error('校验未通过,请检查。') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import edit from './edit' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, edit, myImport}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '类型', field: 'name', align: 'left',}, |
| | | {title: '单号', field: 'code', align: 'center'}, |
| | | {title: '物品名称', field: 'lv', align: 'center', }, |
| | | {title: '规格型号', field: 'lv', align: 'center', }, |
| | | {title: '出入库数量', field: 'summary', align: 'left',}, |
| | | {title: '金额', field: 'summary', align: 'left',}, |
| | | {title: '所属机构', field: 'summary', align: 'left',}, |
| | | {title: '创建人', field: 'summary', align: 'left',}, |
| | | {title: '操作时间', field: 'summary', align: 'left',}, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | // 获取机构树 |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then(res => { |
| | | const content = res || [] |
| | | this.treeDataList.splice(0, this.treeDataList.length) |
| | | this.treeDataList = content |
| | | if (content.length > 0) { |
| | | this.importSetting.fileSettings.data = {pid: content[0].id} |
| | | } |
| | | }) |
| | | }, |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | nodeClick(param) { |
| | | param = param || {} |
| | | this.p = Object.assign({}, { |
| | | id: param.id, |
| | | name: param.name |
| | | }) |
| | | if (this.p.id != undefined && this.p.id != null) { |
| | | this.filterFrom.tenantId = this.p.id |
| | | this.editSetting.orgId = this.p.id |
| | | } else { |
| | | this.filterFrom.tenantId = null |
| | | this.editSetting.orgId = null |
| | | } |
| | | this.importSetting.fileSettings.data = {pid: param.id} |
| | | this.search(1) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-button name="新增" @click="addtable" site="form" /> |
| | | <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}"> |
| | | <el-row class="card" |
| | | :gutter="5"> |
| | | <el-col v-for="(item, index) in proData" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="hed-one"> <span>入库单号:{{ item.order_no }}</span><span style="margin-left: 20px;"><el-button type="warning" plain size="mini">待入库</el-button></span></div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">机构:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">操作人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">出库时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">入库时间:</span>{{ item.customer_name }}</div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.data" class="two-end"> |
| | | <div class="item"><span>{{ just.order_no }}:</span>{{ just.customer_name }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="card-but"> |
| | | <div> |
| | | <my-button style="width: 120px;" name="编辑" site="form" /> |
| | | <my-button style="width: 120px;" name="入库" site="form" /> |
| | | </div> |
| | | <div style="margin-top: 10px;"> |
| | | <my-button style="width: 120px;" name="删除" site="form" /> |
| | | <my-button style="width: 120px;" name="查看详情" site="form" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="1" |
| | | :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" |
| | | :page-size="10" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <el-dialog title="新增出库" :close-on-click-modal="false" :visible.sync="adddialog" width="60%" > |
| | | <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px"> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="出库手续" prop="name"> |
| | | 仅允许导入xls、xlsx格式文件 |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="position: relative;"> |
| | | <div style="background-color: #F9F9F9;width: 90%;"> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="formData.tableData" height="100%" :stripe="true"> |
| | | <el-table-column prop="projectName" label="规格型号" align="center"> </el-table-column> |
| | | <el-table-column prop="time1" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="unit" label="现有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="time2" label="出库数量" align="center"> </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="position: absolute;right: 0;top: 152px;"> |
| | | <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="移除" site="form"/> |
| | | <my-button name="新增物品" site="form"/> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="确定" site="form" /> |
| | | <my-button name="取消" site="form" @click="adddialog = false"/> |
| | | </div> |
| | | </el-dialog> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, myImport}, |
| | | data() { |
| | | return { |
| | | |
| | | adddialog: false, |
| | | formData:{ |
| | | tableData:[ |
| | | { |
| | | projectName:'555' |
| | | }, |
| | | { |
| | | projectName:'444' |
| | | } |
| | | ], |
| | | }, |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '出库单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '出库时间', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val2', |
| | | label: '至', |
| | | defaultValue: '' |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // dataIndex: 'status', |
| | | // label: '状态', |
| | | // placeholder: '请选择', |
| | | // defaultValue: '1', |
| | | // options: [ |
| | | // { |
| | | // label: '启用', |
| | | // value: '1' |
| | | // }, |
| | | // { |
| | | // label: '禁用', |
| | | // value: '0' |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | proData: [ |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'666', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | clientHeight () { |
| | | return document.documentElement.clientHeight |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | handleSizeChange(){}, |
| | | handleCurrentChange(){}, |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | |
| | | addtable() { |
| | | this.adddialog = true |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | // this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | // this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | console.log(params,'555'); |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .card { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin: 0px !important; |
| | | .cm-item { |
| | | width: 100%; |
| | | } |
| | | .cm-item /deep/ .el-card__body { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | .card-data{ |
| | | position: relative; |
| | | margin-top: 8px; |
| | | .card-container{ |
| | | display: inline-block; |
| | | width: 70%; |
| | | .hed-one{ |
| | | color: #2298EE; |
| | | font-size: 18px; |
| | | } |
| | | .one-hed{ |
| | | margin-top: 15px; |
| | | .box{ |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | .span-two{ |
| | | color: #83919e; |
| | | font-size: 14px; |
| | | } |
| | | .card-end{ |
| | | font-size: 14px; |
| | | color: #3d3d3d; |
| | | margin-top: 15px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | .two-end{ |
| | | width: calc(33.33% - 20px); |
| | | margin-bottom: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .card-but{ |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 40%; |
| | | } |
| | | |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <win-sm :title="setting.title" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="编号" prop="code"> |
| | | <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="地址" > |
| | | <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-switch |
| | | v-model="formData.status" |
| | | active-color="#0d997c" |
| | | inactive-color="#C0CCDA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="取消" site="form" @click="close"/> |
| | | <my-button name="保存" site="form" @click="save"/> |
| | | </div> |
| | | </win-sm> |
| | | </template> |
| | | |
| | | <script> |
| | | import winSm from '@/components/win/win-sm' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | |
| | | export default { |
| | | components: {winSm, myButton}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkAll: false, |
| | | checkedList: [], |
| | | formData: { |
| | | code: '', |
| | | name: '', |
| | | status: true, |
| | | summary: '', |
| | | }, |
| | | rules: { |
| | | code: [ |
| | | {required: true, message: '请输入机构编号', trigger: 'blur'} |
| | | ], |
| | | name: [ |
| | | {required: true, message: '请输入机构名称', trigger: 'blur'} |
| | | ], |
| | | status: [ |
| | | {required: true, message: '请选择状态', trigger: 'blur'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if(this.setting.info){ |
| | | this.formData = Object.assign({},JSON.parse(this.setting.info)) |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditInfo(id){ |
| | | |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData) |
| | | if(this.setting.id){ |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.add(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message.error('校验未通过,请检查。') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import edit from './edit' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, edit, myImport}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '单号', field: 'code', align: 'center'}, |
| | | {title: '物品名称', field: 'lv', align: 'center', }, |
| | | {title: '规格型号', field: 'lv', align: 'center', }, |
| | | {title: '单价', field: 'summary', align: 'left',}, |
| | | {title: '入库数量', field: 'summary', align: 'left',}, |
| | | {title: '金额', field: 'summary', align: 'left',}, |
| | | {title: '所属机构', field: 'summary', align: 'left',}, |
| | | {title: '创建人', field: 'summary', align: 'left',}, |
| | | {title: '操作时间', field: 'summary', align: 'left',}, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | // 获取机构树 |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then(res => { |
| | | const content = res || [] |
| | | this.treeDataList.splice(0, this.treeDataList.length) |
| | | this.treeDataList = content |
| | | if (content.length > 0) { |
| | | this.importSetting.fileSettings.data = {pid: content[0].id} |
| | | } |
| | | }) |
| | | }, |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | nodeClick(param) { |
| | | param = param || {} |
| | | this.p = Object.assign({}, { |
| | | id: param.id, |
| | | name: param.name |
| | | }) |
| | | if (this.p.id != undefined && this.p.id != null) { |
| | | this.filterFrom.tenantId = this.p.id |
| | | this.editSetting.orgId = this.p.id |
| | | } else { |
| | | this.filterFrom.tenantId = null |
| | | this.editSetting.orgId = null |
| | | } |
| | | this.importSetting.fileSettings.data = {pid: param.id} |
| | | this.search(1) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-button name="新增" @click="addtable" site="form" /> |
| | | <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}"> |
| | | <el-row class="card" |
| | | :gutter="5"> |
| | | <el-col v-for="(item, index) in proData" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="hed-one"> <span>调拨单号:{{ item.order_no }}</span><span style="margin-left: 20px;"><el-button type="warning" plain size="mini">待接收</el-button></span></div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">接受机构:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">申请人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">申请调拨时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接收时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">调拨时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接受人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接受时间:</span>{{ item.customer_name }}</div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.data" class="two-end"> |
| | | <div class="item"><span>{{ just.order_no }}:</span>{{ just.customer_name }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="card-but"> |
| | | <div style="margin-top: 10px;"> |
| | | <my-button style="width: 120px;" name="删除" site="form" /> |
| | | <my-button style="width: 120px;" name="查看详情" site="form" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="1" |
| | | :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" |
| | | :page-size="10" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <el-dialog title="新增出库" :close-on-click-modal="false" :visible.sync="adddialog" width="60%" > |
| | | <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px"> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="出库手续" prop="name"> |
| | | 仅允许导入xls、xlsx格式文件 |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="position: relative;"> |
| | | <div style="background-color: #F9F9F9;width: 90%;"> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="formData.tableData" height="100%" :stripe="true"> |
| | | <el-table-column prop="projectName" label="规格型号" align="center"> </el-table-column> |
| | | <el-table-column prop="time1" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="unit" label="现有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="time2" label="出库数量" align="center"> </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="position: absolute;right: 0;top: 152px;"> |
| | | <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="移除" site="form"/> |
| | | <my-button name="新增物品" site="form"/> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="确定" site="form" /> |
| | | <my-button name="取消" site="form" @click="adddialog = false"/> |
| | | </div> |
| | | </el-dialog> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, myImport}, |
| | | data() { |
| | | return { |
| | | |
| | | adddialog: false, |
| | | formData:{ |
| | | tableData:[ |
| | | { |
| | | projectName:'555' |
| | | }, |
| | | { |
| | | projectName:'444' |
| | | } |
| | | ], |
| | | }, |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '出库单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '出库时间', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val2', |
| | | label: '至', |
| | | defaultValue: '' |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // dataIndex: 'status', |
| | | // label: '状态', |
| | | // placeholder: '请选择', |
| | | // defaultValue: '1', |
| | | // options: [ |
| | | // { |
| | | // label: '启用', |
| | | // value: '1' |
| | | // }, |
| | | // { |
| | | // label: '禁用', |
| | | // value: '0' |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | proData: [ |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'郑州市邮政分公司' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | clientHeight () { |
| | | return document.documentElement.clientHeight |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | handleSizeChange(){}, |
| | | handleCurrentChange(){}, |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | |
| | | addtable() { |
| | | this.adddialog = true |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | // this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | // this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | console.log(params,'555'); |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .card { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin: 0px !important; |
| | | .cm-item { |
| | | width: 100%; |
| | | } |
| | | .cm-item /deep/ .el-card__body { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | .card-data{ |
| | | position: relative; |
| | | margin-top: 8px; |
| | | .card-container{ |
| | | display: inline-block; |
| | | width: 70%; |
| | | .hed-one{ |
| | | color: #2298EE; |
| | | font-size: 18px; |
| | | } |
| | | .one-hed{ |
| | | margin-top: 5px; |
| | | .box{ |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | .span-two{ |
| | | color: #83919e; |
| | | font-size: 14px; |
| | | } |
| | | .card-end{ |
| | | font-size: 14px; |
| | | color: #3d3d3d; |
| | | margin-top: 15px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | .two-end{ |
| | | width: calc(33.33% - 20px); |
| | | margin-bottom: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .card-but{ |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 40%; |
| | | } |
| | | |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <win-sm :title="setting.title" @close="close" :width="'800px'"> |
| | | <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="编号" prop="code"> |
| | | <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="地址" > |
| | | <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-switch |
| | | v-model="formData.status" |
| | | active-color="#0d997c" |
| | | inactive-color="#C0CCDA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="取消" site="form" @click="close"/> |
| | | <my-button name="保存" site="form" @click="save"/> |
| | | </div> |
| | | </win-sm> |
| | | </template> |
| | | |
| | | <script> |
| | | import winSm from '@/components/win/win-sm' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | |
| | | export default { |
| | | components: {winSm, myButton}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | checkAll: false, |
| | | checkedList: [], |
| | | formData: { |
| | | code: '', |
| | | name: '', |
| | | status: true, |
| | | summary: '', |
| | | }, |
| | | rules: { |
| | | code: [ |
| | | {required: true, message: '请输入机构编号', trigger: 'blur'} |
| | | ], |
| | | name: [ |
| | | {required: true, message: '请输入机构名称', trigger: 'blur'} |
| | | ], |
| | | status: [ |
| | | {required: true, message: '请选择状态', trigger: 'blur'} |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | if(this.setting.info){ |
| | | this.formData = Object.assign({},JSON.parse(this.setting.info)) |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditInfo(id){ |
| | | |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | }, |
| | | save() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData) |
| | | if(this.setting.id){ |
| | | // 编辑接口 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | }else{ |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.add(params).then(res => { |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | | this.close() |
| | | this.$emit('search') |
| | | } else { |
| | | this.$message.error('保存失败') |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.$message.error('校验未通过,请检查。') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import edit from './edit' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, edit, myImport}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '类型', |
| | | placeholder: '请选择', |
| | | defaultValue: '1', |
| | | options: [ |
| | | { |
| | | label: '启用', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '禁用', |
| | | value: '0' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '单号', field: 'code', align: 'center'}, |
| | | {title: '物品名称', field: 'lv', align: 'center', }, |
| | | {title: '规格型号', field: 'lv', align: 'center', }, |
| | | {title: '数量', field: 'summary', align: 'left',}, |
| | | {title: '接受机构', field: 'summary', align: 'left',}, |
| | | {title: '创建人', field: 'summary', align: 'left',}, |
| | | {title: '申请时间', field: 'summary', align: 'left',}, |
| | | {title: '接收时间', field: 'summary', align: 'left',}, |
| | | {title: '调拨机构', field: 'summary', align: 'left',}, |
| | | {title: '调拨人', field: 'summary', align: 'left',}, |
| | | {title: '调拨时间', field: 'summary', align: 'left',}, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | // 获取机构树 |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then(res => { |
| | | const content = res || [] |
| | | this.treeDataList.splice(0, this.treeDataList.length) |
| | | this.treeDataList = content |
| | | if (content.length > 0) { |
| | | this.importSetting.fileSettings.data = {pid: content[0].id} |
| | | } |
| | | }) |
| | | }, |
| | | updState(row) { |
| | | let vm = this |
| | | let text = row.status == 0 ? "启用" : "禁用"; |
| | | vm.$modal.confirm('确认要' + text + '"' + row.name + '"吗?').then(function () { |
| | | let params = Object.assign({}, row) |
| | | params.status = row.status == 1 ? 0 : 1 |
| | | finsystenant.edit(params).then(res => { |
| | | if (res) { |
| | | row.status = row.status === 1 ? 0 : 1 |
| | | vm.$modal.msgSuccess(text + "成功"); |
| | | vm.search() |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | del(row) { |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search() |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | showAdd() { |
| | | // if (!this.editSetting.orgId) { |
| | | // this.$message.warning('请先选择左侧机构') |
| | | // } else { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | // } |
| | | }, |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = JSON.stringify(row); |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | nodeClick(param) { |
| | | param = param || {} |
| | | this.p = Object.assign({}, { |
| | | id: param.id, |
| | | name: param.name |
| | | }) |
| | | if (this.p.id != undefined && this.p.id != null) { |
| | | this.filterFrom.tenantId = this.p.id |
| | | this.editSetting.orgId = this.p.id |
| | | } else { |
| | | this.filterFrom.tenantId = null |
| | | this.editSetting.orgId = null |
| | | } |
| | | this.importSetting.fileSettings.data = {pid: param.id} |
| | | this.search(1) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-container> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 15px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-button name="新增" @click="addtable" site="form" /> |
| | | <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}"> |
| | | <el-row class="card" |
| | | :gutter="5"> |
| | | <el-col v-for="(item, index) in proData" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | | <div class="hed-one"> <span>调拨单号:{{ item.order_no }}</span><span style="margin-left: 20px;"><el-button type="warning" plain size="mini">待接收</el-button></span></div> |
| | | <div class="one-hed"> |
| | | <div class="box"><span class="span-two">接受机构:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">申请人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">申请调拨时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接收时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">调拨时间:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接受人:</span>{{ item.customer_name }}</div> |
| | | <div class="box"><span class="span-two">接受时间:</span>{{ item.customer_name }}</div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.data" class="two-end"> |
| | | <div class="item"><span>{{ just.order_no }}:</span>{{ just.customer_name }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="card-but"> |
| | | <div style="margin-top: 10px;"> |
| | | <my-button style="width: 120px;" name="删除" site="form" /> |
| | | <my-button style="width: 120px;" name="查看详情" site="form" /> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="1" |
| | | :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" |
| | | :page-size="10" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <el-dialog title="新增出库" :close-on-click-modal="false" :visible.sync="adddialog" width="60%" > |
| | | <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px"> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class="headerHeight"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="出库手续" prop="name"> |
| | | 仅允许导入xls、xlsx格式文件 |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="position: relative;"> |
| | | <div style="background-color: #F9F9F9;width: 90%;"> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24" class=""> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仓库名称" prop="name"> |
| | | <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="formData.tableData" height="100%" :stripe="true"> |
| | | <el-table-column prop="projectName" label="规格型号" align="center"> </el-table-column> |
| | | <el-table-column prop="time1" label="单位" align="center"> </el-table-column> |
| | | <el-table-column prop="unit" label="现有库存" align="center"> </el-table-column> |
| | | <el-table-column prop="time2" label="出库数量" align="center"> </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="position: absolute;right: 0;top: 152px;"> |
| | | <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="移除" site="form"/> |
| | | <my-button name="新增物品" site="form"/> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <div slot="footer" align="center" class="dialog-footer"> |
| | | <my-button name="确定" site="form" /> |
| | | <my-button name="取消" site="form" @click="adddialog = false"/> |
| | | </div> |
| | | </el-dialog> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <my-import |
| | | :import-setting="importSetting" |
| | | :dialog-show="importSetting.dialogShow" |
| | | :dialog-title="importSetting.dialogTitle" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyButton from "@/components/myButton/myButton"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, myImport}, |
| | | data() { |
| | | return { |
| | | |
| | | adddialog: false, |
| | | formData:{ |
| | | tableData:[ |
| | | { |
| | | projectName:'555' |
| | | }, |
| | | { |
| | | projectName:'444' |
| | | } |
| | | ], |
| | | }, |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '出库单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val1', |
| | | label: '出库时间', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'val2', |
| | | label: '至', |
| | | defaultValue: '' |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // dataIndex: 'status', |
| | | // label: '状态', |
| | | // placeholder: '请选择', |
| | | // defaultValue: '1', |
| | | // options: [ |
| | | // { |
| | | // label: '启用', |
| | | // value: '1' |
| | | // }, |
| | | // { |
| | | // label: '禁用', |
| | | // value: '0' |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | proData: [ |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'郑州市邮政分公司' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | }, |
| | | { |
| | | order_no:'55555', |
| | | customer_name:'郑州市邮政分公司', |
| | | data:[ |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'20件' |
| | | }, |
| | | { |
| | | order_no:'石勒芬褐色碳粉', |
| | | customer_name:'666' |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | | dialogShow: false, |
| | | fileSettings: { |
| | | data: {}, |
| | | uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 上传地址 |
| | | accept: '.xls', // 格式 |
| | | type: 'text', // 回显形式 |
| | | loading: false // 导入效果 |
| | | }, |
| | | /* 模板下载 */ |
| | | templateSettings: { |
| | | templateName: '导入模板.xls', // 名称 |
| | | templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 下载地址 |
| | | }, |
| | | onSuccess: null |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | clientHeight () { |
| | | return document.documentElement.clientHeight |
| | | }, |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | handleSizeChange(){}, |
| | | handleCurrentChange(){}, |
| | | //导入 |
| | | importOrg() { |
| | | this.importSetting.dialogShow = true |
| | | this.importSetting.onSuccess = (response, callBack) => { |
| | | if (response.code===1){ |
| | | this.$message.success(response.msg) |
| | | this.search(1) |
| | | }else{ |
| | | this.$message.warning(response.msg) |
| | | } |
| | | callBack() |
| | | } |
| | | }, |
| | | |
| | | addtable() { |
| | | this.adddialog = true |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | // this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | // this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | fifterForm(params) { |
| | | console.log(params,'555'); |
| | | this.filterFrom = Object.assign(this.filterFrom, params) |
| | | this.search(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .card { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin: 0px !important; |
| | | .cm-item { |
| | | width: 100%; |
| | | } |
| | | .cm-item /deep/ .el-card__body { |
| | | padding: 10px; |
| | | } |
| | | } |
| | | .card-data{ |
| | | position: relative; |
| | | margin-top: 8px; |
| | | .card-container{ |
| | | display: inline-block; |
| | | width: 70%; |
| | | .hed-one{ |
| | | color: #2298EE; |
| | | font-size: 18px; |
| | | } |
| | | .one-hed{ |
| | | margin-top: 5px; |
| | | .box{ |
| | | display: inline-block; |
| | | margin-right: 20px; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | .span-two{ |
| | | color: #83919e; |
| | | font-size: 14px; |
| | | } |
| | | .card-end{ |
| | | font-size: 14px; |
| | | color: #3d3d3d; |
| | | margin-top: 15px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | .two-end{ |
| | | width: calc(33.33% - 20px); |
| | | margin-bottom: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | .card-but{ |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 40%; |
| | | } |
| | | |
| | | } |
| | | |
| | | </style> |
| | |
| | | {title: '编号', field: 'code', align: 'center', width: '150px'}, |
| | | {title: '机构名称', field: 'name', align: 'left'}, |
| | | {title: '层级', field: 'lv', align: 'center', width: '80px'}, |
| | | {title: '顺序号', field: 'lv', align: 'center', width: '80px'}, |
| | | {title: '备注', field: 'summary', align: 'left', width: '150px'}, |
| | | { |
| | | field: 'belongProvince', |
| | |
| | | this.showAudit(row); |
| | | }, |
| | | }, |
| | | { |
| | | title: '删除', |
| | | events: (row) => { |
| | | this.del(row); |
| | | }, |
| | | } |
| | | // { |
| | | // title: '删除', |
| | | // events: (row) => { |
| | | // this.del(row); |
| | | // }, |
| | | // } |
| | | ], |
| | | }, |
| | | paging: { |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '人员姓名', field: 'userName', align: 'left' }, |
| | | { title: '员工编号', field: 'userCode', align: 'left' }, |
| | | { title: '手机号', field: 'userPhone', align: 'center', width: 150 }, |
| | | { |
| | | title: '创建时间', |
| | | field: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.createTime) }; |
| | | }, |
| | | }, |
| | | { title: '编号', field: 'userCode', align: 'left' }, |
| | | { title: '用户姓名', field: 'userName', align: 'left' }, |
| | | { title: '登录名', field: 'userPhone', align: 'center' }, |
| | | { title: '所属机构', field: 'userPhone', align: 'center', width: 150 }, |
| | | { title: '部门', field: 'userPhone', align: 'center' }, |
| | | { |
| | | field: 'status', |
| | | title: '状态', |
| | |
| | | width: '250', // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '角色', |
| | | events: (row) => { |
| | | this.showEditRole(row.id); |
| | | }, |
| | | }, |
| | | { |
| | | title: '编辑', |
| | | events: (row) => { |
| | | this.showAdd(row.id); |
| | | }, |
| | | }, |
| | | { |
| | | title: '角色', |
| | | events: (row) => { |
| | | this.showEditRole(row.id); |
| | | }, |
| | | }, |
| | | { |
| | | title: '密码初始化', |
| | | events: (row) => { |
| | | this.updPassWord(row); |
| | |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'userName', |
| | | label: '人员姓名', |
| | | label: '用户姓名', |
| | | placeholder: "请输入", |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'userPhone', |
| | | label: '手机号', |
| | | label: '编号', |
| | | placeholder: "请输入", |
| | | defaultValue: '' |
| | | }, |
New file |
| | |
| | | <template> |
| | | <div class="divBox"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="字典名称" prop="dictType"> |
| | | <el-select v-model="queryParams.dictType"> |
| | | <el-option |
| | | v-for="item in typeOptions" |
| | | :key="item.dict_id" |
| | | :label="item.dict_name" |
| | | :value="item.dict_type" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="字典标签" prop="dictLabel"> |
| | | <el-input |
| | | v-model="queryParams.dictLabel" |
| | | placeholder="请输入字典标签" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="数据状态" clearable> |
| | | <el-option |
| | | v-for="item in constants.normalOrDisabled" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:dict:add']" |
| | | >新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:dict:remove']" |
| | | >删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['system:dict:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-close" |
| | | size="mini" |
| | | @click="handleClose" |
| | | >关闭</el-button> |
| | | </el-col> |
| | | <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="字典ID" align="center" prop="dict_code" /> |
| | | <el-table-column label="字典名称" align="center" prop="dict_label"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.list_class == '' || scope.row.list_class == 'default'">{{scope.row.dict_label}}</span> |
| | | <el-tag v-else :type="scope.row.list_class == 'primary' ? '' : scope.row.list_class">{{scope.row.dict_label}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="字典值" align="center" prop="dict_value" /> |
| | | <el-table-column label="排序" align="center" prop="dict_sort" /> |
| | | <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <!-- <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>--> |
| | | <span>{{ scope.row.status == 0? '正常':'禁用' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="父id" align="center" prop="parent_id" /> |
| | | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="创建时间" align="center" prop="create_time" width="180"> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <span>{{ parseTime(scope.row.create_time) }}</span>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:dict:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:dict:remove']" |
| | | >删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- <pagination--> |
| | | <!-- v-show="total>0"--> |
| | | <!-- :total="total"--> |
| | | <!-- :page.sync="queryParams.pageNum"--> |
| | | <!-- :limit.sync="queryParams.pageSize"--> |
| | | <!-- @pagination="getList"--> |
| | | <!-- />--> |
| | | <el-pagination |
| | | :current-page="queryParams.pageNum" |
| | | :page-sizes="constants.page.limit" |
| | | :layout="constants.page.layout" |
| | | :total="this.total" |
| | | @size-change="getList" |
| | | @current-change="getList" |
| | | /> |
| | | </el-card> |
| | | |
| | | <!-- 添加或修改参数配置对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" :before-close="cancel" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="字典ID"> |
| | | <el-input v-model="form.dict_code" :disabled="false" placeholder="一个唯一数字"/> |
| | | </el-form-item> |
| | | <el-form-item label="字典类型"> |
| | | <el-input v-model="form.dict_type" :disabled="true" /> |
| | | </el-form-item> |
| | | <el-form-item label="字典名称" prop="dict_label"> |
| | | <el-input v-model="form.dict_label" placeholder="请输入数据标签" /> |
| | | </el-form-item> |
| | | <el-form-item label="字典值" prop="dict_value"> |
| | | <el-input v-model="form.dict_value" placeholder="不填和字典ID一致" /> |
| | | </el-form-item> |
| | | <el-form-item label="样式属性" prop="css_class"> |
| | | <el-input v-model="form.css_class" placeholder="请输入样式属性" /> |
| | | </el-form-item> |
| | | <el-form-item label="显示排序" prop="dict_sort"> |
| | | <el-input-number v-model="form.dict_sort" controls-position="right" :min="0" /> |
| | | </el-form-item> |
| | | <el-form-item label="回显样式" prop="list_class"> |
| | | <el-select v-model="form.list_class"> |
| | | <el-option |
| | | v-for="item in listClassOptions" |
| | | :key="item.value" |
| | | :label="item.label + '(' + item.value + ')'" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in constants.normalOrDisabled" |
| | | :key="dict.value" |
| | | :label="dict.value * 1" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="父字典ID" prop="dict_label"> |
| | | <el-input v-model="form.parent_id" placeholder="父字典id,必填" /> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"; |
| | | import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type"; |
| | | |
| | | export default { |
| | | name: "Data", |
| | | // dicts: ['sys_normal_disable'], |
| | | data() { |
| | | return { |
| | | constants: this.$constants, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 字典表格数据 |
| | | dataList: [], |
| | | // 默认字典类型 |
| | | defaultDictType: "", |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 数据标签回显样式 |
| | | listClassOptions: [ |
| | | { |
| | | value: "default", |
| | | label: "默认" |
| | | }, |
| | | { |
| | | value: "primary", |
| | | label: "主要" |
| | | }, |
| | | { |
| | | value: "success", |
| | | label: "成功" |
| | | }, |
| | | { |
| | | value: "info", |
| | | label: "信息" |
| | | }, |
| | | { |
| | | value: "warning", |
| | | label: "警告" |
| | | }, |
| | | { |
| | | value: "danger", |
| | | label: "危险" |
| | | } |
| | | ], |
| | | // 类型数据字典 |
| | | typeOptions: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | dictName: undefined, |
| | | dictType: undefined, |
| | | status: undefined |
| | | }, |
| | | // 表单参数 |
| | | form: { |
| | | status: '1' |
| | | }, |
| | | // 表单校验 |
| | | rules: { |
| | | dict_code: [ |
| | | { required: true, message: "字典id必须输入", trigger: "blur" } |
| | | ], |
| | | dict_label: [ |
| | | { required: true, message: "数据标签不能为空", trigger: "blur" } |
| | | ], |
| | | parent_id: [ |
| | | { required: true, message: "父id不能为空", trigger: "blur" } |
| | | ], |
| | | // dict_value: [ |
| | | // { required: true, message: "数据键值不能为空", trigger: "blur" } |
| | | // ], |
| | | dict_sort: [ |
| | | { required: true, message: "数据顺序不能为空", trigger: "blur" } |
| | | ] |
| | | }, |
| | | editMode: false |
| | | }; |
| | | }, |
| | | created() { |
| | | const dictId = this.$route.params && this.$route.params.dictId; |
| | | this.getType(dictId); |
| | | this.getTypeList(); |
| | | }, |
| | | methods: { |
| | | /** 查询字典类型详细 */ |
| | | getType(dictId) { |
| | | getType(dictId).then(response => { |
| | | // this.queryParams.dictType = response.data.dict_type; |
| | | // this.defaultDictType = response.data.dict_type; |
| | | this.queryParams.dictType = response.dict_type; |
| | | this.defaultDictType = response.dict_type; |
| | | this.getList(); |
| | | }); |
| | | }, |
| | | /** 查询字典类型列表 */ |
| | | getTypeList() { |
| | | getDictOptionselect().then(response => { |
| | | this.typeOptions = response.data; |
| | | }); |
| | | }, |
| | | /** 查询字典数据列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listData(this.queryParams).then(response => { |
| | | this.dataList = response.datas; |
| | | this.total = response.totalRows; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | dict_code: undefined, |
| | | dict_label: undefined, |
| | | dict_value: undefined, |
| | | css_class: undefined, |
| | | list_class: 'default', |
| | | dict_sort: 0, |
| | | status: "0", |
| | | parent_id: undefined, |
| | | remark: undefined |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 返回按钮操作 */ |
| | | handleClose() { |
| | | const obj = { path: "/system/dict" }; |
| | | this.$tab.closeOpenPage(obj); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.dictType = this.defaultDictType; |
| | | this.handleQuery(); |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.editMode = false; |
| | | this.open = true; |
| | | this.title = "添加字典数据"; |
| | | // this.form.dictType = this.queryParams.dictType; |
| | | this.form.dict_type = this.queryParams.dictType; |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.dictCode) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | this.editMode = true; |
| | | const dictCode = row.dict_code || this.ids |
| | | getData(dictCode).then(response => { |
| | | this.form = response; |
| | | this.open = true; |
| | | this.title = "修改字典数据"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm: function() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | // if (this.form.dict_code != undefined) { |
| | | if (this.editMode == true) { |
| | | updateData(this.form).then(response => { |
| | | this.$store.dispatch('dict/removeDict', this.queryParams.dictType); |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | console.log(this.form); |
| | | addData(this.form).then(response => { |
| | | this.$store.dispatch('dict/removeDict', this.queryParams.dictType); |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const dictCodes = row.dict_code || this.ids; |
| | | this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() { |
| | | return delData(dictCodes); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | this.$store.dispatch('dict/removeDict', this.queryParams.dictType); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/dict/data/export', { |
| | | ...this.queryParams |
| | | }, `data_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!--左侧树形开始--> |
| | | <el-col :span="5"> |
| | | <el-card class="box-card" shadow="never"> |
| | | <my-tree ref="searchTree" :tree-list="treeDataList" @setNode="nodeClick" @search="search"></my-tree> |
| | | </el-card> |
| | | </el-col> |
| | | <!--左侧树形结束--> |
| | | <!--右侧列表开始--> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> |
| | | <!-- <el-form-item label="字典名称" prop="dictName">--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="queryParams.dictName"--> |
| | | <!-- placeholder="请输入"--> |
| | | <!-- clearable--> |
| | | <!-- style="width: 150px"--> |
| | | <!-- @keyup.enter.native="handleQuery"--> |
| | | <!-- />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="状态" prop="status">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="queryParams.status"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- clearable--> |
| | | <!-- style="width: 150px"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in constants.normalOrDisabled"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>--> |
| | | <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-form>--> |
| | | <!-- <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">--> |
| | | <!-- <el-table-column type="selection" width="55" align="center" />--> |
| | | <!-- <el-table-column label="字典编号" align="center" prop="dict_id" />--> |
| | | <!-- <el-table-column label="字典名称" align="center" prop="dict_name" :show-overflow-tooltip="true" />--> |
| | | <!-- <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <router-link :to="'/systemSetting/dictdata/data/' + scope.row.dict_id" class="link-type">--> |
| | | <!-- <span>{{ scope.row.dict_type }}</span>--> |
| | | <!-- </router-link>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="状态" align="center" prop="status">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <span>{{ scope.row.status == 0? '正常':'禁用' }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />--> |
| | | <!-- <el-table-column label="创建时间" align="center" prop="create_time" width="180">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <span>{{ dateTo(scope.row.create_time) }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- <!– <template slot-scope="scope">–>--> |
| | | <!-- <!– <span>{{ parseTime(scope.row.create_time) }}</span>–>--> |
| | | <!-- <!– </template>–>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- v-hasPermi="['system:dict:edit']"--> |
| | | <!-- >修改</el-button>--> |
| | | <!-- <!– <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-delete"--> |
| | | <!-- @click="handleDelete(scope.row)"--> |
| | | <!-- v-hasPermi="['system:dict:remove']"--> |
| | | <!-- >删除</el-button>–>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- </el-table>--> |
| | | <!--搜索条件--> |
| | | <div class="filter-container"> |
| | | <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> |
| | | </div> |
| | | <el-row style="margin-top: 8px"> |
| | | <el-col> |
| | | <!--列表--> |
| | | <my-table-v2 ref="myTable" :filter="queryParams" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </el-container> |
| | | <!-- 添加或修改参数配置对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="字典名称" prop="dictName"> |
| | | <el-input v-model="form.dictName" placeholder="请输入字典名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="字典类型" prop="dictType"> |
| | | <el-input v-model="form.dictType" placeholder="请输入字典类型" /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="item in constants.normalOrDisabled" |
| | | :key="item.value" |
| | | :label="item.value" |
| | | >{{item.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import myTree from '@/components/myTree/index'; |
| | | import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; |
| | | import * as DateFormatter from "@/utils/DateFormatter"; |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import items from './items' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | export default { |
| | | name: "Dict", |
| | | components: { MyTableV2, myTree }, |
| | | data() { |
| | | return { |
| | | // 树数据 |
| | | treeDataList: [], |
| | | constants: this.$constants, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 字典表格数据 |
| | | typeList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 日期范围 |
| | | dateRange: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | dictName: undefined, |
| | | dictType: undefined, |
| | | status: 0 |
| | | }, |
| | | items:items, |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/system/dict/type/list', // 请求地址 |
| | | // 工具条 |
| | | tools: { |
| | | columnsCtrl: {// 列控制按钮 |
| | | show: false |
| | | }, |
| | | generalExport: {// 通用导出按钮 |
| | | show: false |
| | | }, |
| | | // 自定义工具条按钮 |
| | | custom: [ |
| | | { |
| | | name: '新增', |
| | | click: () => { |
| | | this.showAdd(null); |
| | | }, |
| | | }, |
| | | ] |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | {title: '编号', field: 'dict_id', align: 'center', width: '100px'}, |
| | | {title: '部门', field: 'dict_name', align: 'left'}, |
| | | {title: '顺序号', field: 'dict_name', align: 'left'}, |
| | | {title: '备注', field: 'remark', align: 'left', width: '200px'}, |
| | | { |
| | | title: '状态', field: 'status', align: 'center', width: '180px', |
| | | formatter: row => { |
| | | return { value: row.status=== 0? '启用':'禁用' } |
| | | } |
| | | }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | // width: 150, |
| | | align: 'center', |
| | | show: false, // 显示操作列 |
| | | attr: [ |
| | | // 分类下有正在进行中的项目时,给出提示不允许禁用和删除。且禁用一级分类前需要先禁用下面的所有二级,有启用的二级时不允许禁用一级 |
| | | { |
| | | // checkPermission:'system:role:edit', |
| | | title: '修改', |
| | | events: row => { |
| | | this.handleUpdate(row) |
| | | } |
| | | }, |
| | | // { |
| | | // // checkPermission: 'system:role:remove', |
| | | // title: '删除', |
| | | // events: row => { |
| | | // this.handleDelete(row) |
| | | // } |
| | | // }, |
| | | ] |
| | | }, |
| | | paging: { |
| | | show: true, // 显示分页 |
| | | // 分页信息 |
| | | page: { |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | dictName: [ |
| | | { required: true, message: "字典名称不能为空", trigger: "blur" } |
| | | ], |
| | | dictType: [ |
| | | { required: true, message: "字典类型不能为空", trigger: "blur" } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then((res) => { |
| | | const content = res || []; |
| | | this.treeDataList.splice(0, this.treeDataList.length); |
| | | this.treeDataList = content; |
| | | if (this.treeDataList && this.treeDataList.length > 0) { |
| | | this.tenantId = this.treeDataList[0].id; |
| | | this.tenantName = this.treeDataList[0].label; |
| | | this.tenantCode = this.treeDataList[0].code; |
| | | } |
| | | }); |
| | | }, |
| | | nodeClick(param) { |
| | | console.log(param,'param'); |
| | | this.search(1) |
| | | }, |
| | | fifterForm(params) { |
| | | this.queryParams = Object.assign(this.queryParams, params) |
| | | this.search(1) |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum != undefined) { |
| | | this.$refs.myTable.search(pageNum) |
| | | } else { |
| | | this.$refs.myTable.search() |
| | | } |
| | | }, |
| | | dateTo(val) { |
| | | return DateFormatter.LongToDateTime(val); |
| | | }, |
| | | changeSize(e){ |
| | | this.queryParams.pageSize = e |
| | | this.getList() |
| | | }, |
| | | changePage(e){ |
| | | this.queryParams.pageNum = e |
| | | this.getList() |
| | | }, |
| | | /** 查询字典类型列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listType(this.queryParams).then(response => { |
| | | // this.typeList = response.rows; |
| | | this.typeList = response.datas; |
| | | this.total = response.totalRows; |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | dictId: undefined, |
| | | dictName: undefined, |
| | | dictType: undefined, |
| | | status: "0", |
| | | remark: undefined |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.dateRange = []; |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "添加字典类型"; |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.dictId) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const dictId = row.dict_id || this.ids |
| | | getType(dictId).then(response => { |
| | | this.form = response; |
| | | this.form.dictName = this.form.dict_name |
| | | this.form.dictType = this.form.dict_type |
| | | this.open = true; |
| | | this.title = "修改字典类型"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm: function() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.dictId != undefined) { |
| | | updateType(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addType(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const dictIds = row.dictId || this.ids; |
| | | this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() { |
| | | return delType(dictIds); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('system/dict/type/export', { |
| | | ...this.queryParams |
| | | }, `type_${new Date().getTime()}.xlsx`) |
| | | }, |
| | | /** 刷新缓存按钮操作 */ |
| | | handleRefreshCache() { |
| | | refreshCache().then(() => { |
| | | this.$modal.msgSuccess("刷新成功"); |
| | | this.$store.dispatch('dict/cleanDict'); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
New file |
| | |
| | | export default [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'dictName', |
| | | label: '部门名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'dictName', |
| | | label: '编号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'status', |
| | | label: '状态', |
| | | placeholder: '请选择', |
| | | defaultValue: '0', |
| | | options: [ |
| | | { |
| | | value: '0', |
| | | label: '启用' |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '禁用' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <!--左侧树形开始--> |
| | | <el-col :span="5"> |
| | | <el-card class="box-card" shadow="never"> |
| | | <my-tree ref="searchTree" :tree-list="treeDataList" @setNode="nodeClick" @search="search"></my-tree> |
| | | </el-card> |
| | | </el-col> |
| | | <!--左侧树形结束--> |
| | | <!--右侧列表开始--> |
| | | <el-container> |
| | | <el-card class="box-card" style="width: 100%" shadow="never"> |
| | | <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">--> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import myTree from '@/components/myTree/index'; |
| | | import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; |
| | | import * as DateFormatter from "@/utils/DateFormatter"; |
| | | import MyTableV2 from "@/components/myTable/myTableV2"; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import items from './items' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | export default { |
| | | name: "Dict", |
| | | components: { MyTableV2 }, |
| | | components: { MyTableV2, myTree }, |
| | | data() { |
| | | return { |
| | | // 树数据 |
| | | treeDataList: [], |
| | | constants: this.$constants, |
| | | // 遮罩层 |
| | | loading: true, |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | // 左侧树初始化 |
| | | initTreeData() { |
| | | finsystenant.getTree().then((res) => { |
| | | const content = res || []; |
| | | this.treeDataList.splice(0, this.treeDataList.length); |
| | | this.treeDataList = content; |
| | | if (this.treeDataList && this.treeDataList.length > 0) { |
| | | this.tenantId = this.treeDataList[0].id; |
| | | this.tenantName = this.treeDataList[0].label; |
| | | this.tenantCode = this.treeDataList[0].code; |
| | | } |
| | | }); |
| | | }, |
| | | nodeClick(param) { |
| | | console.log(param,'param'); |
| | | this.search(1) |
| | | }, |
| | | fifterForm(params) { |
| | | this.queryParams = Object.assign(this.queryParams, params) |
| | | this.search(1) |
| | |
| | | custom: [ |
| | | { |
| | | name: '新增', |
| | | checkPermission:'system:role:edit', |
| | | // checkPermission:'system:role:edit', |
| | | click: () => { |
| | | this.handleAdd(null) |
| | | } |
| | |
| | | {title: '角色编号', field: 'role_id', align: 'center', width: '200px'}, |
| | | {title: '角色名称', field: 'role_name', align: 'center', width: '260px'}, |
| | | {title: '权限字符', field: 'role_key', align: 'center', width: '260px'}, |
| | | {title: '显示顺序', field: 'role_sort', align: 'center', width: '100px'}, |
| | | {title: '顺序号', field: 'role_sort', align: 'center', width: '100px'}, |
| | | { |
| | | title: '状态', field: 'status', align: 'center', width: '100px', |
| | | switch: row => { |
| | |
| | | return result |
| | | } |
| | | }, |
| | | {title: '备注', field: 'remark', align: 'left', width: '250px'}, |
| | | // {title: '备注', field: 'remark', align: 'left', width: '250px'}, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.pojo.BaseCategoryParam; |
| | | import com.consum.base.pojo.BaseGoodsTemplateParam; |
| | | import com.consum.base.service.BaseCategoryServiceImpl; |
| | | import com.consum.base.service.BaseGoodsTemplateServiceImpl; |
| | | import com.consum.model.po.BaseCategory; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.vo.BaseGoodsTemplateVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description 物品模板 |
| | |
| | | protected boolean isset_id = false; |
| | | |
| | | // 属性列表 |
| | | private Integer warehouseType = null; |
| | | @JsonIgnore |
| | | protected boolean isset_warehouseType = false; |
| | | |
| | | private String warehouseCode = null; |
| | | @JsonIgnore |
| | | protected boolean isset_warehouseCode = false; |
| | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | public Integer getWarehouseType() { |
| | | return this.warehouseType; |
| | | } |
| | | |
| | | public void setWarehouseType(Integer warehouseType) { |
| | | this.warehouseType = warehouseType; |
| | | this.isset_warehouseType = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyWarehouseType() { |
| | | return this.warehouseType == null; |
| | | } |
| | | |
| | | public String getWarehouseCode() { |
| | |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("warehouseType=").append(this.warehouseType) |
| | | .append("warehouseCode=").append(this.warehouseCode) |
| | | .append("warehouseName=").append(this.warehouseName) |
| | | .append("adress=").append(this.adress) |
| | |
| | | base_warehouse.setId(this.getId()); |
| | | } |
| | | // 普通属性 |
| | | if (this.isset_warehouseType) { |
| | | base_warehouse.setWarehouseType(this.getWarehouseType()); |
| | | } |
| | | if (this.isset_warehouseCode) { |
| | | base_warehouse.setWarehouseCode(this.getWarehouseCode()); |
| | | } |
| | |
| | | // 主键 |
| | | public static final String Id = "id"; |
| | | // 普通属性 |
| | | public static final String WarehouseType = "warehouse_type"; |
| | | public static final String WarehouseCode = "warehouse_code"; |
| | | public static final String WarehouseName = "warehouse_name"; |
| | | public static final String Adress = "adress"; |
| | |
| | | this.setId(baseWarehouse.getId()); |
| | | } |
| | | //普通属性 |
| | | if (baseWarehouse.isset_warehouseType) { |
| | | this.setWarehouseType(baseWarehouse.getWarehouseType()); |
| | | } |
| | | if (baseWarehouse.isset_warehouseCode) { |
| | | this.setWarehouseCode(baseWarehouse.getWarehouseCode()); |
| | | } |
| | |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ib.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode); |
| | | ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); |
| | | ib.set(Adress, this.getAdress(), this.isset_adress); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode); |
| | | ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); |
| | | ub.set(Adress, this.getAdress(), this.isset_adress); |
| | |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode); |
| | | ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); |
| | | ub.set(Adress, this.getAdress(), this.isset_adress); |
| | |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(WarehouseType, this.getWarehouseType(), this.isset_warehouseType); |
| | | ub.set(WarehouseCode, this.getWarehouseCode(), this.isset_warehouseCode); |
| | | ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName); |
| | | ub.set(Adress, this.getAdress(), this.isset_adress); |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, warehouse_type, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, warehouse_type, warehouse_code, warehouse_name, adress, parent_agency_id, agency_id, agency_name, classification_code, classification_name, is_default, states from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | base_warehouse.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //普通属性 |
| | | columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.WarehouseType); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | base_warehouse.setWarehouseType(null); |
| | | } else { |
| | | base_warehouse.setWarehouseType(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, BaseWarehouse_mapper.WarehouseCode); |
| | | if (columnIndex > 0) { |
| | | base_warehouse.setWarehouseCode(rs.getString(columnIndex)); |
New file |
| | |
| | | |
| | | package com.consum.model.po; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.walker.jdbc.BasePo; |
| | | |
| | | /** |
| | | * 表名:FIN_SYS_TENANT_DEPARTMENT * |
| | | * @author genrator |
| | | */ |
| | | @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY) |
| | | public class FinSysTenantDepartment extends BasePo<FinSysTenantDepartment> { |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // 主键 |
| | | private Long id = null; |
| | | @JsonIgnore |
| | | protected boolean isset_id = false; |
| | | |
| | | // 属性列表 |
| | | private String code = null; |
| | | @JsonIgnore |
| | | protected boolean isset_code = false; |
| | | |
| | | private String name = null; |
| | | @JsonIgnore |
| | | protected boolean isset_name = false; |
| | | |
| | | private Integer orderNum = null; |
| | | @JsonIgnore |
| | | protected boolean isset_orderNum = false; |
| | | |
| | | private String summary = null; |
| | | @JsonIgnore |
| | | protected boolean isset_summary = false; |
| | | |
| | | private Integer status = null; |
| | | @JsonIgnore |
| | | protected boolean isset_status = false; |
| | | |
| | | private Integer isDelete = null; |
| | | @JsonIgnore |
| | | protected boolean isset_isDelete = false; |
| | | |
| | | private Long tenantId = null; |
| | | @JsonIgnore |
| | | protected boolean isset_tenantId = false; |
| | | |
| | | private Long createTime = null; |
| | | @JsonIgnore |
| | | protected boolean isset_createTime = false; |
| | | |
| | | private Long updateTime = null; |
| | | @JsonIgnore |
| | | protected boolean isset_updateTime = false; |
| | | |
| | | private String createBy = null; |
| | | @JsonIgnore |
| | | protected boolean isset_createBy = false; |
| | | |
| | | private String updateBy = null; |
| | | @JsonIgnore |
| | | protected boolean isset_updateBy = false; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public FinSysTenantDepartment() { |
| | | } |
| | | |
| | | /** |
| | | * 根据主键构造对象 |
| | | */ |
| | | public FinSysTenantDepartment(Long id) { |
| | | this.setId(id); |
| | | } |
| | | |
| | | /** |
| | | * 设置主键值 |
| | | */ |
| | | @Override |
| | | public void setPkValue(Object value) { |
| | | this.setId((Long) value); |
| | | } |
| | | |
| | | public Long getId() { |
| | | return this.id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | this.isset_id = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyId() { |
| | | return this.id == null; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return this.code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | this.isset_code = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyCode() { |
| | | return this.code == null || this.code.length() == 0; |
| | | } |
| | | |
| | | public String getName() { |
| | | return this.name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | this.isset_name = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyName() { |
| | | return this.name == null || this.name.length() == 0; |
| | | } |
| | | |
| | | public Integer getOrderNum() { |
| | | return this.orderNum; |
| | | } |
| | | |
| | | public void setOrderNum(Integer orderNum) { |
| | | this.orderNum = orderNum; |
| | | this.isset_orderNum = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyOrderNum() { |
| | | return this.orderNum == null; |
| | | } |
| | | |
| | | public String getSummary() { |
| | | return this.summary; |
| | | } |
| | | |
| | | public void setSummary(String summary) { |
| | | this.summary = summary; |
| | | this.isset_summary = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptySummary() { |
| | | return this.summary == null || this.summary.length() == 0; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return this.status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | this.isset_status = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyStatus() { |
| | | return this.status == null; |
| | | } |
| | | |
| | | public Integer getIsDelete() { |
| | | return this.isDelete; |
| | | } |
| | | |
| | | public void setIsDelete(Integer isDelete) { |
| | | this.isDelete = isDelete; |
| | | this.isset_isDelete = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyIsDelete() { |
| | | return this.isDelete == null; |
| | | } |
| | | |
| | | public Long getTenantId() { |
| | | return this.tenantId; |
| | | } |
| | | |
| | | public void setTenantId(Long tenantId) { |
| | | this.tenantId = tenantId; |
| | | this.isset_tenantId = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyTenantId() { |
| | | return this.tenantId == null; |
| | | } |
| | | |
| | | public Long getCreateTime() { |
| | | return this.createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Long createTime) { |
| | | this.createTime = createTime; |
| | | this.isset_createTime = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyCreateTime() { |
| | | return this.createTime == null; |
| | | } |
| | | |
| | | public Long getUpdateTime() { |
| | | return this.updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Long updateTime) { |
| | | this.updateTime = updateTime; |
| | | this.isset_updateTime = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUpdateTime() { |
| | | return this.updateTime == null; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return this.createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | this.isset_createBy = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyCreateBy() { |
| | | return this.createBy == null || this.createBy.length() == 0; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return this.updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | this.isset_updateBy = true; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public boolean isEmptyUpdateBy() { |
| | | return this.updateBy == null || this.updateBy.length() == 0; |
| | | } |
| | | |
| | | /** |
| | | * 重写 toString() 方法 |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return new StringBuilder() |
| | | .append("id=").append(this.id) |
| | | .append("code=").append(this.code) |
| | | .append("name=").append(this.name) |
| | | .append("orderNum=").append(this.orderNum) |
| | | .append("summary=").append(this.summary) |
| | | .append("status=").append(this.status) |
| | | .append("isDelete=").append(this.isDelete) |
| | | .append("tenantId=").append(this.tenantId) |
| | | .append("createTime=").append(this.createTime) |
| | | .append("updateTime=").append(this.updateTime) |
| | | .append("createBy=").append(this.createBy) |
| | | .append("updateBy=").append(this.updateBy) |
| | | .toString(); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public FinSysTenantDepartment $clone() { |
| | | FinSysTenantDepartment fin_sys_tenant_department = new FinSysTenantDepartment(); |
| | | |
| | | // 数据库名称 |
| | | //fin_sys_tenant_department.setDatabaseName_(this.getDatabaseName_()); |
| | | |
| | | // 主键 |
| | | if (this.isset_id) { |
| | | fin_sys_tenant_department.setId(this.getId()); |
| | | } |
| | | // 普通属性 |
| | | if (this.isset_code) { |
| | | fin_sys_tenant_department.setCode(this.getCode()); |
| | | } |
| | | if (this.isset_name) { |
| | | fin_sys_tenant_department.setName(this.getName()); |
| | | } |
| | | if (this.isset_orderNum) { |
| | | fin_sys_tenant_department.setOrderNum(this.getOrderNum()); |
| | | } |
| | | if (this.isset_summary) { |
| | | fin_sys_tenant_department.setSummary(this.getSummary()); |
| | | } |
| | | if (this.isset_status) { |
| | | fin_sys_tenant_department.setStatus(this.getStatus()); |
| | | } |
| | | if (this.isset_isDelete) { |
| | | fin_sys_tenant_department.setIsDelete(this.getIsDelete()); |
| | | } |
| | | if (this.isset_tenantId) { |
| | | fin_sys_tenant_department.setTenantId(this.getTenantId()); |
| | | } |
| | | if (this.isset_createTime) { |
| | | fin_sys_tenant_department.setCreateTime(this.getCreateTime()); |
| | | } |
| | | if (this.isset_updateTime) { |
| | | fin_sys_tenant_department.setUpdateTime(this.getUpdateTime()); |
| | | } |
| | | if (this.isset_createBy) { |
| | | fin_sys_tenant_department.setCreateBy(this.getCreateBy()); |
| | | } |
| | | if (this.isset_updateBy) { |
| | | fin_sys_tenant_department.setUpdateBy(this.getUpdateBy()); |
| | | } |
| | | return fin_sys_tenant_department; |
| | | } |
| | | } |
New file |
| | |
| | | package com.consum.model.po; |
| | | |
| | | import com.walker.jdbc.BaseMapper; |
| | | import com.walker.jdbc.ResultSetUtils; |
| | | import com.walker.jdbc.SqlAndParameters; |
| | | import com.walker.jdbc.sqlgen.DeleteBuilder; |
| | | import com.walker.jdbc.sqlgen.InsertBuilder; |
| | | import com.walker.jdbc.sqlgen.SelectBuilder; |
| | | import com.walker.jdbc.sqlgen.UpdateBuilder; |
| | | import com.walker.jdbc.util.StringUtils; |
| | | |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 表名:FIN_SYS_TENANT_DEPARTMENT * |
| | | * @author genrator |
| | | */ |
| | | public class FinSysTenantDepartment_mapper extends FinSysTenantDepartment implements BaseMapper<FinSysTenantDepartment> { |
| | | // 序列化版本号 |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public static final RowMapper<FinSysTenantDepartment> ROW_MAPPER = new FinSysTenantDepartmentRowMapper(); |
| | | |
| | | // 主键 |
| | | public static final String Id = "id"; |
| | | // 普通属性 |
| | | public static final String Code = "code"; |
| | | public static final String Name = "name"; |
| | | public static final String OrderNum = "order_num"; |
| | | public static final String Summary = "summary"; |
| | | public static final String Status = "status"; |
| | | public static final String IsDelete = "is_delete"; |
| | | public static final String TenantId = "tenant_id"; |
| | | public static final String CreateTime = "create_time"; |
| | | public static final String UpdateTime = "update_time"; |
| | | public static final String CreateBy = "create_by"; |
| | | public static final String UpdateBy = "update_by"; |
| | | |
| | | /** |
| | | * 默认构造函数 |
| | | */ |
| | | public FinSysTenantDepartment_mapper(FinSysTenantDepartment finSysTenantDepartment) { |
| | | if (finSysTenantDepartment == null) { |
| | | throw new IllegalArgumentException("po参数不允许为空!"); |
| | | } |
| | | //主键 |
| | | if (finSysTenantDepartment.isset_id) { |
| | | this.setId(finSysTenantDepartment.getId()); |
| | | } |
| | | //普通属性 |
| | | if (finSysTenantDepartment.isset_code) { |
| | | this.setCode(finSysTenantDepartment.getCode()); |
| | | } |
| | | if (finSysTenantDepartment.isset_name) { |
| | | this.setName(finSysTenantDepartment.getName()); |
| | | } |
| | | if (finSysTenantDepartment.isset_orderNum) { |
| | | this.setOrderNum(finSysTenantDepartment.getOrderNum()); |
| | | } |
| | | if (finSysTenantDepartment.isset_summary) { |
| | | this.setSummary(finSysTenantDepartment.getSummary()); |
| | | } |
| | | if (finSysTenantDepartment.isset_status) { |
| | | this.setStatus(finSysTenantDepartment.getStatus()); |
| | | } |
| | | if (finSysTenantDepartment.isset_isDelete) { |
| | | this.setIsDelete(finSysTenantDepartment.getIsDelete()); |
| | | } |
| | | if (finSysTenantDepartment.isset_tenantId) { |
| | | this.setTenantId(finSysTenantDepartment.getTenantId()); |
| | | } |
| | | if (finSysTenantDepartment.isset_createTime) { |
| | | this.setCreateTime(finSysTenantDepartment.getCreateTime()); |
| | | } |
| | | if (finSysTenantDepartment.isset_updateTime) { |
| | | this.setUpdateTime(finSysTenantDepartment.getUpdateTime()); |
| | | } |
| | | if (finSysTenantDepartment.isset_createBy) { |
| | | this.setCreateBy(finSysTenantDepartment.getCreateBy()); |
| | | } |
| | | if (finSysTenantDepartment.isset_updateBy) { |
| | | this.setUpdateBy(finSysTenantDepartment.getUpdateBy()); |
| | | } |
| | | // 去掉,2022-09-07 |
| | | // this.setDatabaseName_(fin_sys_tenant_department.getDatabaseName_()); |
| | | } |
| | | |
| | | /** |
| | | * 获取表名 |
| | | */ |
| | | @Override |
| | | public String getTableName_() { |
| | | String tableName = "fin_sys_tenant_department"; |
| | | /** |
| | | if (StringUtils.isNotEmpty(this.getDatabaseName_())) { |
| | | return this.getDatabaseName_() + "." + tableName; |
| | | } else { |
| | | return tableName; |
| | | } |
| | | */ |
| | | return tableName; |
| | | } |
| | | |
| | | /** |
| | | * 获取主键名称 |
| | | */ |
| | | @Override |
| | | public String getPkName_() { |
| | | return Id; |
| | | } |
| | | |
| | | /** |
| | | * 获取主键值 |
| | | */ |
| | | @Override |
| | | public Object getPkValue_() { |
| | | return this.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 获取插入语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getInsertSql_() { |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(Code, this.getCode(), this.isset_code); |
| | | ib.set(Name, this.getName(), this.isset_name); |
| | | ib.set(OrderNum, this.getOrderNum(), this.isset_orderNum); |
| | | ib.set(Summary, this.getSummary(), this.isset_summary); |
| | | ib.set(Status, this.getStatus(), this.isset_status); |
| | | ib.set(IsDelete, this.getIsDelete(), this.isset_isDelete); |
| | | ib.set(TenantId, this.getTenantId(), this.isset_tenantId); |
| | | ib.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ib.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); |
| | | ib.set(CreateBy, this.getCreateBy(), this.isset_createBy); |
| | | ib.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); |
| | | return ib.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(Code, this.getCode(), this.isset_code); |
| | | ub.set(Name, this.getName(), this.isset_name); |
| | | ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); |
| | | ub.set(Summary, this.getSummary(), this.isset_summary); |
| | | ub.set(Status, this.getStatus(), this.isset_status); |
| | | ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); |
| | | ub.set(TenantId, this.getTenantId(), this.isset_tenantId); |
| | | ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); |
| | | ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); |
| | | ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); |
| | | ub.where(this.getPkName_(), this.getPkValue_()); |
| | | return ub.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(Code, this.getCode(), this.isset_code); |
| | | ub.set(Name, this.getName(), this.isset_name); |
| | | ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); |
| | | ub.set(Summary, this.getSummary(), this.isset_summary); |
| | | ub.set(Status, this.getStatus(), this.isset_status); |
| | | ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); |
| | | ub.set(TenantId, this.getTenantId(), this.isset_tenantId); |
| | | ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); |
| | | ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); |
| | | ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); |
| | | return ub.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取更新语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(Code, this.getCode(), this.isset_code); |
| | | ub.set(Name, this.getName(), this.isset_name); |
| | | ub.set(OrderNum, this.getOrderNum(), this.isset_orderNum); |
| | | ub.set(Summary, this.getSummary(), this.isset_summary); |
| | | ub.set(Status, this.getStatus(), this.isset_status); |
| | | ub.set(IsDelete, this.getIsDelete(), this.isset_isDelete); |
| | | ub.set(TenantId, this.getTenantId(), this.isset_tenantId); |
| | | ub.set(CreateTime, this.getCreateTime(), this.isset_createTime); |
| | | ub.set(UpdateTime, this.getUpdateTime(), this.isset_updateTime); |
| | | ub.set(CreateBy, this.getCreateBy(), this.isset_createBy); |
| | | ub.set(UpdateBy, this.getUpdateBy(), this.isset_updateBy); |
| | | return ub.genArraySql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取删除语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getDeleteSql_() { |
| | | DeleteBuilder db = new DeleteBuilder(this.getTableName_()); |
| | | db.where(this.getPkName_(), this.getPkValue_()); |
| | | return db.genMapSql(); |
| | | } |
| | | |
| | | /** |
| | | * 获取删除语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getDeleteSql_(String where, Map<String, Object> parameters) { |
| | | DeleteBuilder db = new DeleteBuilder(this.getTableName_()); |
| | | return db.genMapSql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取删除语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getDeleteSql_(String where, Object[] parameters) { |
| | | DeleteBuilder db = new DeleteBuilder(this.getTableName_()); |
| | | return db.genArraySql(where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取单行查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSingleSql_() { |
| | | SelectBuilder sb = new SelectBuilder(this.getTableName_()); |
| | | sb.where(this.getPkName_(), this.getPkValue_()); |
| | | return sb.genMapSql(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, code, name, order_num, summary, status, is_delete, tenant_id, create_time, update_time, create_by, update_by from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 获取查询语句和参数 |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, code, name, order_num, summary, status, is_delete, tenant_id, create_time, update_time, create_by, update_by from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | | * 将resultset的一行转化为po |
| | | */ |
| | | @Override |
| | | public FinSysTenantDepartment mapRow(ResultSet rs, int i) throws SQLException { |
| | | return ROW_MAPPER.mapRow(rs, i); |
| | | } |
| | | |
| | | /** |
| | | * 克隆 |
| | | */ |
| | | public FinSysTenantDepartment toFinSysTenantDepartment() { |
| | | return super.$clone(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * fin_sys_tenant_department RowMapper |
| | | * |
| | | * @author genrator |
| | | */ |
| | | class FinSysTenantDepartmentRowMapper implements RowMapper<FinSysTenantDepartment> { |
| | | |
| | | @Override |
| | | public FinSysTenantDepartment mapRow(ResultSet rs, int i) throws SQLException { |
| | | ResultSetUtils resultSetUtils = new ResultSetUtils(); |
| | | FinSysTenantDepartment fin_sys_tenant_department = new FinSysTenantDepartment(); |
| | | Integer columnIndex; |
| | | //主键 |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.Id); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_department.setId(rs.getLong(columnIndex)); |
| | | } |
| | | //普通属性 |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.Code); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_department.setCode(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.Name); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_department.setName(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.OrderNum); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | fin_sys_tenant_department.setOrderNum(null); |
| | | } else { |
| | | fin_sys_tenant_department.setOrderNum(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.Summary); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_department.setSummary(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.Status); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | fin_sys_tenant_department.setStatus(null); |
| | | } else { |
| | | fin_sys_tenant_department.setStatus(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.IsDelete); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | fin_sys_tenant_department.setIsDelete(null); |
| | | } else { |
| | | fin_sys_tenant_department.setIsDelete(rs.getInt(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.TenantId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | fin_sys_tenant_department.setTenantId(null); |
| | | } else { |
| | | fin_sys_tenant_department.setTenantId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.CreateTime); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | fin_sys_tenant_department.setCreateTime(null); |
| | | } else { |
| | | fin_sys_tenant_department.setCreateTime(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.UpdateTime); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | fin_sys_tenant_department.setUpdateTime(null); |
| | | } else { |
| | | fin_sys_tenant_department.setUpdateTime(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.CreateBy); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_department.setCreateBy(rs.getString(columnIndex)); |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, FinSysTenantDepartment_mapper.UpdateBy); |
| | | if (columnIndex > 0) { |
| | | fin_sys_tenant_department.setUpdateBy(rs.getString(columnIndex)); |
| | | } |
| | | return fin_sys_tenant_department; |
| | | } |
| | | } |