代码提交

main
zhangdi 4 months ago
parent e6ae005812
commit 7ee3048269
  1. 15
      src/api/firstOrder/list.js
  2. 8
      src/config/website.js
  3. 34
      src/page/login/index.vue
  4. 4
      src/page/login/userlogin.vue
  5. 8
      src/router/axios.js
  6. 2
      src/styles/login.scss
  7. 198
      src/views/authority/role.vue
  8. 7
      src/views/dataAnalysis/analysis.vue
  9. 197
      src/views/demandOrder/index.vue
  10. 8
      src/views/firstOrder/components/inDialog.vue
  11. 4
      src/views/firstOrder/components/outDialog.vue
  12. 73
      src/views/firstOrder/list.vue
  13. 219
      src/views/materials/expend.vue
  14. 10
      src/views/materials/index.vue
  15. 4
      src/views/secondOrder/components/inDialog.vue
  16. 4
      src/views/secondOrder/components/outDialog.vue
  17. 3
      src/views/secondOrder/list.vue
  18. 1
      src/views/system/menu.vue
  19. 11
      vue.config.js

@ -0,0 +1,15 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/smartpark/oneForm/list',
method: 'get',
params: {
...params,
pageSize:size,
pageNum:current,
},
cryptoToken: false,
cryptoData: false
})
}

@ -5,12 +5,12 @@ export default {
title: "saber", title: "saber",
logo: "X", logo: "X",
key: 'saber',//配置主键,目前用于存储 key: 'saber',//配置主键,目前用于存储
indexTitle: '微服务平台', indexTitle: '低值耐用品信息化平台',
clientId: 'saber', // 客户端id clientId: 'saber', // 客户端id
clientSecret: 'saber_secret', // 客户端密钥 clientSecret: 'saber_secret', // 客户端密钥
tenantMode: true, // 是否开启租户模式 tenantMode: false, // 是否开启租户模式
tenantId: "000000", // 管理组租户编号 tenantId: "000000", // 管理组租户编号
captchaMode: true, // 是否开启验证码模式 captchaMode: false, // 是否开启验证码模式
switchMode: false, // 是否开启登录切换角色部门 switchMode: false, // 是否开启登录切换角色部门
lockPage: '/lock', lockPage: '/lock',
tokenTime: 3000, tokenTime: 3000,
@ -48,7 +48,7 @@ export default {
publicKey: publicKey:
'04bab0a6e83fd3134503206093f0cb4d1cb55a608e5ba2ea67e8aa53030c3bab6cb6c864a5b5251b62f8717029c6277e8f8a2a3e9ecb4c474b03a8faa00a118933', '04bab0a6e83fd3134503206093f0cb4d1cb55a608e5ba2ea67e8aa53030c3bab6cb6c864a5b5251b62f8717029c6277e8f8a2a3e9ecb4c474b03a8faa00a118933',
// 第三方系统授权地址 // 第三方系统授权地址
authUrl: 'http://localhost/blade-auth/oauth/render', authUrl: 'http://192.168.0.110:1888/blade-auth/oauth/render',
// 单点登录系统认证 // 单点登录系统认证
ssoMode: false, // 是否开启单点登录功能 ssoMode: false, // 是否开启单点登录功能
ssoBaseUrl: 'http://localhost:8100', // 单点登录系统地址(cloud端口为8100,boot端口为80) ssoBaseUrl: 'http://localhost:8100', // 单点登录系统地址(cloud端口为8100,boot端口为80)

@ -8,45 +8,19 @@
<div class="login-time"> <div class="login-time">
{{time}} {{time}}
</div> </div>
<p class="title">{{ $t('login.info') }}</p> <p class="title">低值耐用品信息化平台</p>
<!-- <div style="font-size: 15px">
<span>----------------------------------------------</span>
<br>
<span>管理租户编号000000</span>
<br>
<span>超级管理员账号: admin / admin</span>
<br>
<span>人事账号: hr / hr</span>
<br>
<span>经理账号: manager / manager</span>
<br>
<span>老板账号: boss / boss</span>
<br>
<span>----------------------------------------------</span>
<br>
<span>普通租户编号详见租户管理模块</span>
<br>
<span>租户管理员账号: admin / admin</span>
<br>
<span>----------------------------------------------</span>
</div> -->
<!--<img class="img" src="/img/logo.png" alt="">-->
</div> </div>
<div class="login-border"> <div class="login-border">
<div class="login-main"> <div class="login-main">
<h4 class="login-title"> <h4 class="login-title">
{{ $t('login.title') }}{{website.title}} {{ $t('login.title') }}
<!-- <top-lang></top-lang> --> <!-- <top-lang></top-lang> -->
</h4> </h4>
<userLogin v-if="activeName==='user'"></userLogin> <userLogin v-if="activeName==='user'"></userLogin>
<codeLogin v-else-if="activeName==='code'"></codeLogin> <codeLogin v-else-if="activeName==='code'"></codeLogin>
<thirdLogin v-else-if="activeName==='third'"></thirdLogin> <thirdLogin v-else-if="activeName==='third'"></thirdLogin>
<!-- <div class="login-menu">
<a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>
<a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>
<a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>
<a :href="website.oauth2.ssoBaseUrl + website.oauth2.ssoAuthUrl + website.oauth2.redirectUri">{{ $t('login.ssoLogin') }}</a>
</div> -->
</div> </div>
</div> </div>

@ -59,12 +59,12 @@
@click.native.prevent="handleLogin" @click.native.prevent="handleLogin"
:class="this.registerMode ? 'login-submit' : 'btn-submit'">{{$t('login.submit')}} :class="this.registerMode ? 'login-submit' : 'btn-submit'">{{$t('login.submit')}}
</el-button> </el-button>
<el-button type="danger" <!-- <el-button type="danger"
size="small" size="small"
v-if="this.registerMode" v-if="this.registerMode"
@click.native.prevent="handleRegister" @click.native.prevent="handleRegister"
class="register-submit">{{ $t('login.register') }} class="register-submit">{{ $t('login.register') }}
</el-button> </el-button> -->
</el-form-item> </el-form-item>
<el-dialog title="用户信息选择" <el-dialog title="用户信息选择"
append-to-body append-to-body

@ -47,8 +47,15 @@ axios.interceptors.request.use(config => {
isErrorShown = false; isErrorShown = false;
//地址为已经配置状态则不添加前缀 //地址为已经配置状态则不添加前缀
if (!isURL(config.url) && !config.url.startsWith(baseUrl)) { if (!isURL(config.url) && !config.url.startsWith(baseUrl)) {
if(config.url.indexOf('smartpark')>0){
config.url = config.url;
}else{
config.url = baseUrl + config.url; config.url = baseUrl + config.url;
} }
console.log(99999,config.url.indexOf('smartpark')>0,baseUrl,config.url)
}
//安全请求header //安全请求header
config.headers['Blade-Requested-With'] = 'BladeHttpRequest'; config.headers['Blade-Requested-With'] = 'BladeHttpRequest';
//headers判断是否需要 //headers判断是否需要
@ -95,6 +102,7 @@ axios.interceptors.request.use(config => {
//http response拦截 //http response拦截
axios.interceptors.response.use(res => { axios.interceptors.response.use(res => {
// console.log('响应拦截',res)
//关闭 progress bar //关闭 progress bar
NProgress.done(); NProgress.done();
//获取配置信息 //获取配置信息

@ -125,7 +125,7 @@
} }
.login-submit { .login-submit {
width: 60%; width: 100%;
height: 45px; height: 45px;
border: 1px solid #409EFF; border: 1px solid #409EFF;
background: none; background: none;

@ -1,6 +1,7 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" <avue-crud
:option="option"
:table-loading="loading" :table-loading="loading"
:data="data" :data="data"
ref="crud" ref="crud"
@ -16,74 +17,85 @@
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad"> @on-load="onLoad"
>
<template slot="menuLeft"> <template slot="menuLeft">
<el-button type="danger" <el-button
type="danger"
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
v-if="permission.role_delete" v-if="permission.role_delete"
plain plain
@click="handleDelete"> @click="handleDelete"
>
</el-button> </el-button>
<el-button size="small" <el-button
size="small"
icon="el-icon-setting" icon="el-icon-setting"
@click="handleRole" @click="handleRole"
v-if="userInfo.role_name.includes('admin')" v-if="userInfo.role_name.includes('admin')"
plain>权限设置 plain
>权限设置
</el-button> </el-button>
</template> </template>
<template slot-scope="{row}" slot="menu"> <template slot-scope="{ row }" slot="menu">
<el-button <el-button
type="text" type="text"
icon="el-icon-setting" icon="el-icon-setting"
size="small" size="small"
v-if="userInfo.role_name.includes('admin')" v-if="userInfo.role_name.includes('admin')"
plain plain
style="border: 0;background-color: transparent !important;" style="border: 0; background-color: transparent !important"
@click.stop="handleRowRole(row)" @click.stop="handleRowRole(row)"
>权限设置 >权限设置
</el-button> </el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-dialog title="角色权限配置" <el-dialog
title="角色权限配置"
append-to-body append-to-body
:visible.sync="box" :visible.sync="box"
width="345px"> width="345px"
>
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="菜单权限"> <el-tab-pane label="菜单权限">
<el-tree :data="menuGrantList" <el-tree
:data="menuGrantList"
show-checkbox show-checkbox
node-key="id" node-key="id"
ref="treeMenu" ref="treeMenu"
:default-checked-keys="menuTreeObj" :default-checked-keys="menuTreeObj"
:props="props"> :props="props"
>
</el-tree> </el-tree>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="数据权限"> <el-tab-pane label="数据权限">
<el-tree :data="dataScopeGrantList" <el-tree
:data="dataScopeGrantList"
show-checkbox show-checkbox
node-key="id" node-key="id"
ref="treeDataScope" ref="treeDataScope"
:default-checked-keys="dataScopeTreeObj" :default-checked-keys="dataScopeTreeObj"
:props="props"> :props="props"
>
</el-tree> </el-tree>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="接口权限"> <el-tab-pane label="接口权限">
<el-tree :data="apiScopeGrantList" <el-tree
:data="apiScopeGrantList"
show-checkbox show-checkbox
node-key="id" node-key="id"
ref="treeApiScope" ref="treeApiScope"
:default-checked-keys="apiScopeTreeObj" :default-checked-keys="apiScopeTreeObj"
:props="props"> :props="props"
>
</el-tree> </el-tree>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="box = false"> </el-button> <el-button @click="box = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="submit"> </el-button>
@click="submit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</basic-container> </basic-container>
@ -99,20 +111,20 @@ import {
grant, grant,
grantTree, grantTree,
remove, remove,
update update,
} from "@/api/system/role"; } from "@/api/system/role";
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import website from '@/config/website'; import website from "@/config/website";
import {validatenull} from "@/util/validate"; import { validatenull } from "@/util/validate";
export default { export default {
data() { data() {
return { return {
form: {}, form: {},
box: false, box: false,
props: { props: {
label: "title", label: "title",
value: "key" value: "key",
}, },
menuGrantList: [], menuGrantList: [],
dataScopeGrantList: [], dataScopeGrantList: [],
@ -127,9 +139,11 @@ import {validatenull} from "@/util/validate";
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0 total: 0,
}, },
option: { option: {
height: "auto",
calcHeight: 30,
tip: false, tip: false,
simplePage: true, simplePage: true,
searchShow: true, searchShow: true,
@ -153,15 +167,15 @@ import {validatenull} from "@/util/validate";
hide: true, hide: true,
span: 24, span: 24,
props: { props: {
label: "title" label: "title",
}, },
rules: [ rules: [
{ {
required: false, required: false,
message: "请选择上级角色", message: "请选择上级角色",
trigger: "click" trigger: "click",
} },
] ],
}, },
{ {
label: "角色名称", label: "角色名称",
@ -172,9 +186,9 @@ import {validatenull} from "@/util/validate";
{ {
required: true, required: true,
message: "请输入角色名称", message: "请输入角色名称",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "所属租户", label: "所属租户",
@ -187,19 +201,22 @@ import {validatenull} from "@/util/validate";
span: 24, span: 24,
props: { props: {
label: "tenantName", label: "tenantName",
value: "tenantId" value: "tenantId",
}, },
hide: !website.tenantMode, hide: !website.tenantMode,
search: website.tenantMode, search: website.tenantMode,
rules: [{ rules: [
{
required: true, required: true,
message: "请输入所属租户", message: "请输入所属租户",
trigger: "click" trigger: "click",
}] },
],
}, },
{ {
label: "角色别名", label: "角色别名",
labelTip: '用于权限校验与标注的属性,可手动录入也可点击现有别名快速录入', labelTip:
"用于权限校验与标注的属性,可手动录入也可点击现有别名快速录入",
prop: "roleAlias", prop: "roleAlias",
search: true, search: true,
span: 24, span: 24,
@ -207,19 +224,19 @@ import {validatenull} from "@/util/validate";
{ {
required: true, required: true,
message: "请输入角色别名", message: "请输入角色别名",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: '现有别名', label: "现有别名",
labelTip: '当前系统已存在的角色别名,点击可快速录入', labelTip: "当前系统已存在的角色别名,点击可快速录入",
prop: 'currentAlias', prop: "currentAlias",
type: 'radio', type: "radio",
dicData: [], dicData: [],
props: { props: {
label: 'roleName', label: "roleName",
value: 'roleAlias', value: "roleAlias",
}, },
hide: true, hide: true,
span: 24, span: 24,
@ -233,13 +250,13 @@ import {validatenull} from "@/util/validate";
{ {
required: true, required: true,
message: "请输入角色排序", message: "请输入角色排序",
trigger: "blur" trigger: "blur",
}
]
}
]
}, },
data: [] ],
},
],
},
data: [],
}; };
}, },
computed: { computed: {
@ -249,27 +266,26 @@ import {validatenull} from "@/util/validate";
addBtn: this.vaildData(this.permission.role_add, false), addBtn: this.vaildData(this.permission.role_add, false),
viewBtn: this.vaildData(this.permission.role_view, false), viewBtn: this.vaildData(this.permission.role_view, false),
delBtn: this.vaildData(this.permission.role_delete, false), delBtn: this.vaildData(this.permission.role_delete, false),
editBtn: this.vaildData(this.permission.role_edit, false) editBtn: this.vaildData(this.permission.role_edit, false),
}; };
}, },
ids() { ids() {
let ids = []; let ids = [];
this.selectionList.forEach(ele => { this.selectionList.forEach((ele) => {
ids.push(ele.id); ids.push(ele.id);
}); });
return ids.join(","); return ids.join(",");
}, },
idsArray() { idsArray() {
let ids = []; let ids = [];
this.selectionList.forEach(ele => { this.selectionList.forEach((ele) => {
ids.push(ele.id); ids.push(ele.id);
}); });
return ids; return ids;
} },
}, },
watch: { watch: {
'form.currentAlias'() { "form.currentAlias"() {
const alias = this.form.currentAlias; const alias = this.form.currentAlias;
if (!validatenull(alias)) { if (!validatenull(alias)) {
this.form.roleAlias = alias; this.form.roleAlias = alias;
@ -277,8 +293,8 @@ import {validatenull} from "@/util/validate";
}, },
}, },
methods: { methods: {
initData(roleId){ initData(roleId) {
getRoleTreeById(roleId).then(res => { getRoleTreeById(roleId).then((res) => {
const column = this.findObject(this.option.column, "parentId"); const column = this.findObject(this.option.column, "parentId");
column.dicData = res.data.data; column.dicData = res.data.data;
}); });
@ -291,43 +307,49 @@ import {validatenull} from "@/util/validate";
this.box = false; this.box = false;
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
this.selectionList = []; this.selectionList = [];
this.onLoad(this.page); this.onLoad(this.page);
}); });
}, },
rowSave(row, done, loading) { rowSave(row, done, loading) {
add(row).then(() => { add(row).then(
() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
done(); done();
}, error => { },
(error) => {
window.console.log(error); window.console.log(error);
loading(); loading();
}); }
);
}, },
rowUpdate(row, index, done, loading) { rowUpdate(row, index, done, loading) {
update(row).then(() => { update(row).then(
() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
done(); done();
}, error => { },
(error) => {
window.console.log(error); window.console.log(error);
loading(); loading();
}); }
);
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
return remove(row.id); return remove(row.id);
@ -336,7 +358,7 @@ import {validatenull} from "@/util/validate";
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
}); });
}, },
@ -362,8 +384,8 @@ import {validatenull} from "@/util/validate";
if (["add", "edit"].includes(type)) { if (["add", "edit"].includes(type)) {
this.initData(this.form.id); this.initData(this.form.id);
} }
getRoleAlias().then(res => { getRoleAlias().then((res) => {
const column = this.findObject(this.option.column, 'currentAlias'); const column = this.findObject(this.option.column, "currentAlias");
column.dicData = res.data.data; column.dicData = res.data.data;
}); });
done(); done();
@ -376,12 +398,11 @@ import {validatenull} from "@/util/validate";
this.menuTreeObj = []; this.menuTreeObj = [];
this.dataScopeTreeObj = []; this.dataScopeTreeObj = [];
this.apiScopeTreeObj = []; this.apiScopeTreeObj = [];
grantTree() grantTree().then((res) => {
.then(res => {
this.menuGrantList = res.data.data.menu; this.menuGrantList = res.data.data.menu;
this.dataScopeGrantList = res.data.data.dataScope; this.dataScopeGrantList = res.data.data.dataScope;
this.apiScopeGrantList = res.data.data.apiScope; this.apiScopeGrantList = res.data.data.apiScope;
getRole(this.ids).then(res => { getRole(this.ids).then((res) => {
this.menuTreeObj = res.data.data.menu; this.menuTreeObj = res.data.data.menu;
this.dataScopeTreeObj = res.data.data.dataScope; this.dataScopeTreeObj = res.data.data.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope; this.apiScopeTreeObj = res.data.data.apiScope;
@ -393,12 +414,11 @@ import {validatenull} from "@/util/validate";
this.menuTreeObj = []; this.menuTreeObj = [];
this.dataScopeTreeObj = []; this.dataScopeTreeObj = [];
this.apiScopeTreeObj = []; this.apiScopeTreeObj = [];
grantTree() grantTree().then((res) => {
.then(res => {
this.menuGrantList = res.data.data.menu; this.menuGrantList = res.data.data.menu;
this.dataScopeGrantList = res.data.data.dataScope; this.dataScopeGrantList = res.data.data.dataScope;
this.apiScopeGrantList = res.data.data.apiScope; this.apiScopeGrantList = res.data.data.apiScope;
getRole(row.id).then(res => { getRole(row.id).then((res) => {
this.menuTreeObj = res.data.data.menu; this.menuTreeObj = res.data.data.menu;
this.dataScopeTreeObj = res.data.data.dataScope; this.dataScopeTreeObj = res.data.data.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope; this.apiScopeTreeObj = res.data.data.apiScope;
@ -415,7 +435,7 @@ import {validatenull} from "@/util/validate";
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
return remove(this.ids); return remove(this.ids);
@ -424,7 +444,7 @@ import {validatenull} from "@/util/validate";
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
@ -440,12 +460,16 @@ import {validatenull} from "@/util/validate";
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
).then((res) => {
this.data = res.data.data; this.data = res.data.data;
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
}); });
} },
} },
}; };
</script> </script>

@ -1,7 +1,7 @@
<template> <template>
<basic-container> <basic-container>
<el-row :gutter=24> <el-row :gutter=24>
<el-row :gutter=24> <el-row :gutter=24 v-if="this.permission.departmentSearch" >
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item label="日期"> <el-form-item label="日期">
@ -53,8 +53,11 @@
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import {mapGetters} from "vuex";
export default { export default {
computed: {
...mapGetters(["userInfo", "permission"]),
},
data() { data() {
return { return {
options: [{ options: [{

@ -0,0 +1,197 @@
<template>
<div>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
:permission="permissionList" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad">
<template slot-scope="scope" slot="menu">
</template>
</avue-crud>
</basic-container>
</div>
</template>
<script>
import { getList, remove } from "@/api/report/report";
import { mapGetters } from "vuex";
export default {
data() {
return {
form: {},
selectionList: [],
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
selection: true,
viewBtn: true,
dialogClickModal: false,
menu: false,
selection: false,
printBtn: false,
refreshBtn: false,
gridBtn: false,
gridBackgroundImage: false,
gridSpan: false,
filterBtn: false,
columnBtn: false,
column: [
{
label: "需求单号",
prop: "no",
search: true,
},
{
label: "需求时间",
prop: "name",
},
{
label: "物品名称",
prop: "number",
},
{
label: "型号",
prop: "number",
},
{
label: "数量",
prop: "number",
},
{
label: "金额",
prop: "pice",
}
]
},
data: [],
dialogLogVisible: false,
activeName: 'first',
tableData: [],
ckTable: [
{str1: '3', str2: '2025-04-09', str3: '部门一'},
{str1: '37', str2: '2025-04-03', str3: '部门一'}
],
rkTable: [
{str1: '5',str2: '2025-03-19',str3: '部门二'},
{str1: '12',str2: '2025-03-19',str3: '部门二'},
],
bfTable: [
{str1: '9',str2: '2025-03-19',str3: '部门三'},
{str1: '19',str2: '2025-03-19',str3: '部门三'},
],
};
},
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: false,
editBtn: false
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
mounted() {
this.tableData = this.ckTable
},
methods: {
handleLog() {
this.dialogLogVisible = true
},
handleTabClick(tab, event) {
console.log(tab, event);
if(this.activeName=='first'){
this.tableData = this.ckTable
}
if(this.activeName=='second'){
this.tableData = this.rkTable
}
if(this.activeName=='third'){
this.tableData = this.bfTable
}
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
this.data.push({
no: '00100001',
name: '物品1',
xh: '1',
lb: '易耗品',
unit: '11',
number: '1',
dj: '11',
pice: '11'
}, {
no: '00100002',
name: '物品2',
xh: '2',
lb: '耐用品',
unit: '22',
number: '2',
dj: '11',
pice: '22'
})
this.loading = false
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
// const data = res.data.data;
// this.page.total = data.total;
// this.data = data.records;
// this.loading = false;
// this.selectionClear();
// });
}
}
};
</script>
<style></style>

@ -93,20 +93,20 @@
:disabled="(scope.row.status != 1)||(allDisabled)" ></el-input-number> :disabled="(scope.row.status != 1)||(allDisabled)" ></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="str6" label="需求数量" > <!-- <el-table-column prop="str6" label="需求数量" >
</el-table-column> </el-table-column> -->
<el-table-column prop="str8" label="单价" > <el-table-column prop="str8" label="单价" >
</el-table-column> </el-table-column>
<!-- <el-table-column prop="str9" label="需求部门" width="100"> <!-- <el-table-column prop="str9" label="需求部门" width="100">
</el-table-column> --> </el-table-column> -->
<el-table-column prop="status" label="入库情况" v-if="!allDisabled"> <!-- <el-table-column prop="status" label="入库情况" v-if="!allDisabled">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="putIn(scope.row)" v-if="scope.row.status == 1">入库</el-button> <el-button type="text" @click="putIn(scope.row)" v-if="scope.row.status == 1">入库</el-button>
<span v-else>已入库</span> <span v-else>已入库</span>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<div class="form-title">入库账目表格</div> <div class="form-title">入库账目表格</div>
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%"> <el-table :data="sizeForm.inAccountsTableData" border style="width: 100%">

@ -108,12 +108,12 @@
<el-table-column prop="str8" label="单价" width="100"> <el-table-column prop="str8" label="单价" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="status" label="出库情况"> <!-- <el-table-column prop="status" label="出库情况">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="putIn(scope.row)" v-if="scope.row.status == 1">出库</el-button> <el-button type="text" @click="putIn(scope.row)" v-if="scope.row.status == 1">出库</el-button>
<span v-if="scope.row.status == 0">已出库</span> <span v-if="scope.row.status == 0">已出库</span>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<div class="form-title">出库账目表格</div> <div class="form-title">出库账目表格</div>
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%"> <el-table :data="sizeForm.inAccountsTableData" border style="width: 100%">

@ -17,7 +17,7 @@
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="入库" name="first"></el-tab-pane> <el-tab-pane label="入库" name="first"></el-tab-pane>
<el-tab-pane label="出库" name="second"></el-tab-pane> <el-tab-pane label="出库" name="second"></el-tab-pane>
<el-tab-pane label="报废" name="third"></el-tab-pane> <!-- <el-tab-pane label="报废" name="third"></el-tab-pane> -->
</el-tabs> </el-tabs>
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%">
<el-table-column type="index" width="50"> <el-table-column type="index" width="50">
@ -39,7 +39,9 @@
</template> </template>
<script> <script>
import { getList, remove } from "@/api/report/report"; // import { getList, remove } from "@/api/report/report";
import { getList } from "@/api/firstOrder/list";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
@ -77,28 +79,28 @@ export default {
column: [ column: [
{ {
label: "存货编号", label: "存货编号",
prop: "no", prop: "stockCode",
}, },
{ {
label: "存货名称", label: "存货名称",
prop: "name", prop: "stockName",
search: true, search: true,
}, },
{ {
label: "规格型号", label: "规格型号",
prop: "xh", prop: "model",
}, },
{ {
label: "类别", label: "类别",
prop: "lb", prop: "materialType",
search: true, search: true,
type: 'select', type: 'select',
dicData: [{ dicData: [{
label: '易耗品', label: '易耗品',
value: 0 value: 1
}, { }, {
label: '耐用品', label: '耐用品',
value: 1 value: 2
}] }]
}, },
{ {
@ -107,15 +109,15 @@ export default {
}, },
{ {
label: "数量", label: "数量",
prop: "number", prop: "num",
}, },
{ {
label: "单价", label: "单价",
prop: "dj", prop: "unitPrice",
}, },
{ {
label: "金额", label: "金额",
prop: "pice", prop: "amount",
} }
] ]
}, },
@ -205,33 +207,34 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.data.push({ // this.data.push({
no: '00100001', // no: '00100001',
name: '物品1', // name: '1',
xh: '1', // xh: '1',
lb: '易耗品', // lb: '',
unit: '11', // unit: '11',
number: '1', // number: '1',
dj: '11', // dj: '11',
pice: '11' // pice: '11'
}, { // }, {
no: '00100002', // no: '00100002',
name: '物品2', // name: '2',
xh: '2', // xh: '2',
lb: '耐用品', // lb: '',
unit: '22', // unit: '22',
number: '2', // number: '2',
dj: '11', // dj: '11',
pice: '22' // pice: '22'
}) // })
this.loading = false this.loading = false
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log(898989,res.data.result)
// const data = res.data.data; // const data = res.data.data;
// this.page.total = data.total; this.data = res.data.result.list;
// this.data = data.records; this.loading = false;
// this.loading = false; this.page.total = res.data.result.total;
// this.selectionClear(); // this.selectionClear();
// }); });
} }
} }
}; };

@ -1,26 +1,63 @@
<template> <template>
<div> <div>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page" <avue-crud
:permission="permissionList" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" :option="option"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" :table-loading="loading"
@refresh-change="refreshChange" @on-load="onLoad"> :data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template slot-scope="scope" slot="menu"> <template slot-scope="scope" slot="menu">
<el-button v-if="scope.row.status=='未归还'" type="text" size="small" @click.stop="handleReturn(scope.row)">归还 <el-button
v-if="scope.row.status == '未归还'"
type="text"
size="small"
@click.stop="handleReturn(scope.row)"
>归还
</el-button>
<el-button
type="text"
size="small"
@click.stop="handleScrap(scope.row)"
v-if="scope.row.status == '未归还'"
>报废
</el-button> </el-button>
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
<!-- 归还 --> <!-- 归还 -->
<el-dialog title="归还" :visible.sync="dialogReturnVisible" width="30%" :close-on-click-modal="false" <el-dialog
:append-to-body="true"> title="归还"
:visible.sync="dialogReturnVisible"
width="30%"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-form ref="form" :model="returnForm" label-width="100px"> <el-form ref="form" :model="returnForm" label-width="100px">
<el-form-item label="归还数量"> <el-form-item label="归还数量">
<el-input-number v-model="returnForm.count" :min="1"></el-input-number> <el-input-number
v-model="returnForm.count"
:min="1"
></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="归还理由"> <el-form-item label="归还理由">
<el-input v-model="returnForm.rmark" type="textarea" :rows="3" placeholder="请输入内容"></el-input> <el-input
v-model="returnForm.rmark"
type="textarea"
:rows="3"
placeholder="请输入内容"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -43,10 +80,10 @@ export default {
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0 total: 0,
}, },
option: { option: {
height: 'auto', height: "auto",
calcHeight: 30, calcHeight: 30,
tip: false, tip: false,
searchShow: true, searchShow: true,
@ -74,14 +111,17 @@ export default {
label: "部门", label: "部门",
prop: "str8", prop: "str8",
search: true, search: true,
type: 'select', type: "select",
dicData: [{ dicData: [
label: '部门一', {
value: 0 label: "部门一",
}, { value: 0,
label: '部门二', },
value: 1 {
}] label: "部门二",
value: 1,
},
],
}, },
{ {
label: "名称", label: "名称",
@ -111,43 +151,45 @@ export default {
{ {
label: "金额", label: "金额",
prop: "pice", prop: "pice",
},{ },
{
label: "状态", label: "状态",
prop: "status", prop: "status",
},{ },
{
label: "归还时间", label: "归还时间",
prop: "time", prop: "time",
} },
] ],
}, },
data: [], data: [],
dialogReturnVisible: false, dialogReturnVisible: false,
returnInfo: {}, returnInfo: {},
returnForm: { returnForm: {
count: 0, count: 0,
rmark: '', rmark: "",
}, },
dialogScrapVisible:false, dialogScrapVisible: false,
scrapInfo: {}, scrapInfo: {},
scrapForm: { scrapForm: {
count: 0, count: 0,
rmark: '', rmark: "",
}, },
dialogLogVisible: false, dialogLogVisible: false,
activeName: 'first', activeName: "first",
tableData: [], tableData: [],
ckTable: [ ckTable: [
{str1: '3', str2: '2025-04-09', str3: '部门一'}, { str1: "3", str2: "2025-04-09", str3: "部门一" },
{str1: '37', str2: '2025-04-03', str3: '部门一'} { str1: "37", str2: "2025-04-03", str3: "部门一" },
], ],
rkTable: [ rkTable: [
{str1: '5',str2: '2025-03-19',str3: '部门二'}, { str1: "5", str2: "2025-03-19", str3: "部门二" },
{str1: '12',str2: '2025-03-19',str3: '部门二'}, { str1: "12", str2: "2025-03-19", str3: "部门二" },
], ],
bfTable: [ bfTable: [
{str1: '9',str2: '2025-03-19',str3: '部门三'}, { str1: "9", str2: "2025-03-19", str3: "部门三" },
{str1: '19',str2: '2025-03-19',str3: '部门三'}, { str1: "19", str2: "2025-03-19", str3: "部门三" },
], ],
}; };
}, },
@ -158,43 +200,46 @@ export default {
addBtn: false, addBtn: false,
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtn: false editBtn: false,
}; };
}, },
ids() { ids() {
let ids = []; let ids = [];
this.selectionList.forEach(ele => { this.selectionList.forEach((ele) => {
ids.push(ele.id); ids.push(ele.id);
}); });
return ids.join(","); return ids.join(",");
} },
}, },
mounted() { mounted() {
this.tableData = this.ckTable this.tableData = this.ckTable;
}, },
methods: { methods: {
handleLog() { handleLog() {
this.dialogLogVisible = true this.dialogLogVisible = true;
}, },
handleTabClick(tab, event) { handleTabClick(tab, event) {
console.log(tab, event); console.log(tab, event);
if(this.activeName=='first'){ if (this.activeName == "first") {
this.tableData = this.ckTable this.tableData = this.ckTable;
} }
if(this.activeName=='second'){ if (this.activeName == "second") {
this.tableData = this.rkTable this.tableData = this.rkTable;
} }
if(this.activeName=='third'){ if (this.activeName == "third") {
this.tableData = this.bfTable this.tableData = this.bfTable;
} }
}, },
handlePreview(name) { handlePreview(name) {
this.$router.push({ path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.design.reportUrl}/preview?_u=blade-${name}` }); this.$router.push({
path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.design.reportUrl}/preview?_u=blade-${name}`,
});
}, },
handleDesign(name) { handleDesign(name) {
this.$router.push({ path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.design.reportUrl}/designer?_u=blade-${name}` }); this.$router.push({
path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.design.reportUrl}/designer?_u=blade-${name}`,
});
}, },
searchReset() { searchReset() {
@ -226,57 +271,59 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.data.push({ this.data.push(
no: '00100001', {
name: '物品1', no: "00100001",
xh: '1', name: "物品1",
lb: '耐用品', xh: "1",
unit: '11', lb: "耐用品",
number: '1', unit: "11",
dj: '11', number: "1",
pice: '11', dj: "11",
status:'未归还', pice: "11",
str8:'部门一' status: "未归还",
}, { str8: "部门一",
no: '00100002', },
name: '物品2', {
xh: '2', no: "00100002",
lb: '耐用品', name: "物品2",
unit: '22', xh: "2",
number: '1', lb: "耐用品",
dj: '11', unit: "22",
pice: '22', number: "1",
status:'已归还', dj: "11",
time:'2024-01-04', pice: "22",
str8:'部门二' status: "已归还",
}) time: "2024-01-04",
this.loading = false str8: "部门二",
}
);
this.loading = false;
}, },
// //
handleReturn(row) { handleReturn(row) {
this.dialogReturnVisible = true this.dialogReturnVisible = true;
this.returnInfo = JSON.parse(JSON.stringify(row)) this.returnInfo = JSON.parse(JSON.stringify(row));
}, },
returnSave() { returnSave() {
this.dialogReturnVisible = false this.dialogReturnVisible = false;
this.$message({ this.$message({
type: "success", type: "success",
message: "归还成功" message: "归还成功",
}); });
}, },
// //
handleScrap(row){ handleScrap(row) {
this.dialogScrapVisible = true this.dialogScrapVisible = true;
this.scrapInfo = JSON.parse(JSON.stringify(row)) this.scrapInfo = JSON.parse(JSON.stringify(row));
}, },
scrapSave(){ scrapSave() {
this.dialogScrapVisible = false this.dialogScrapVisible = false;
this.$message({ this.$message({
type: "success", type: "success",
message: "报废成功" message: "报废成功",
}); });
} },
} },
}; };
</script> </script>

@ -57,12 +57,12 @@ export default {
prop: "name", prop: "name",
search: true, search: true,
}, },
// {
// label: "",
// prop: "ge",
// },
{ {
label: "规格", label: "规格/型号",
prop: "ge",
},
{
label: "型号",
prop: "xh", prop: "xh",
}, },
{ {

@ -130,7 +130,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="str8" label="单价" width="100"> </el-table-column> <el-table-column prop="str8" label="单价" width="100"> </el-table-column>
<el-table-column prop="str9" label="需求部门" width="100"> </el-table-column> <el-table-column prop="str9" label="需求部门" width="100"> </el-table-column>
<el-table-column prop="status" label="入库情况"> <!-- <el-table-column prop="status" label="入库情况">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@ -140,7 +140,7 @@
> >
<span v-else>已入库</span> <span v-else>已入库</span>
</template> </template>
</el-table-column> </el-table-column>-->
</el-table> </el-table>
<div class="form-title">入库账目表格</div> <div class="form-title">入库账目表格</div>
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%"> <el-table :data="sizeForm.inAccountsTableData" border style="width: 100%">

@ -147,7 +147,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="str8" label="单价" width="100"> </el-table-column> <el-table-column prop="str8" label="单价" width="100"> </el-table-column>
<el-table-column prop="status" label="出库情况"> <!-- <el-table-column prop="status" label="出库情况">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@ -157,7 +157,7 @@
> >
<span v-if="scope.row.status == 0">已出库</span> <span v-if="scope.row.status == 0">已出库</span>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<div class="form-title">出库账目表格</div> <div class="form-title">出库账目表格</div>
<el-table :data="sizeForm.inAccountsTableData" border style="width: 100%"> <el-table :data="sizeForm.inAccountsTableData" border style="width: 100%">

@ -8,8 +8,7 @@
<template slot-scope="scope" slot="menu"> <template slot-scope="scope" slot="menu">
<!-- <el-button type="text" size="small" @click.stop="handleReturn(scope.row)">归还 <!-- <el-button type="text" size="small" @click.stop="handleReturn(scope.row)">归还
</el-button> --> </el-button> -->
<el-button type="text" size="small" @click.stop="handleScrap(scope.row)">报废
</el-button>
<el-button type="text" size="small" @click.stop="handleLog(scope.row)">记录 <el-button type="text" size="small" @click.stop="handleLog(scope.row)">记录
</el-button> </el-button>

@ -69,6 +69,7 @@
total: 0, total: 0,
}, },
option: { option: {
height: "auto",
lazy: true, lazy: true,
tip: false, tip: false,
simplePage: true, simplePage: true,

@ -34,6 +34,17 @@ module.exports = {
pathRewrite: { pathRewrite: {
'^/api': '/' '^/api': '/'
} }
},
'/smartpark': {
//本地服务接口地址
// target: 'http://192.168.1.4:8088',
target: 'http://192.168.0.120:8081',
//远程演示服务地址,可用于直接启动项目
// target: 'https://saber.bladex.cn/api',
ws: true,
pathRewrite: {
'^/smartpark/': '/'
}
} }
} }
} }

Loading…
Cancel
Save