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">出库单号:{{ 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">出库单号:{{ 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">出库单号:{{ 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> |
| | | <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> |
| | | <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> |
| | | <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: '' |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | 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',}, |
| | | ], |
| | | // 操作信息 |
| | | 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> |
| | | <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: '' |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | 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',}, |
| | | ], |
| | | // 操作信息 |
| | | 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> |
| | | <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> |
| | | <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> |
| | | <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> |
| | | <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">出库单号:{{ 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> |