This commit is contained in:
parent
2099b07178
commit
2e35c42b69
|
|
@ -1,10 +1,10 @@
|
|||
# 页面标题
|
||||
VUE_APP_TITLE = 材料站材料库存管理系统
|
||||
VUE_APP_TITLE = 智慧材料站管理系统
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
# 材料站材料库存管理系统/开发环境
|
||||
# 智慧材料站管理系统/开发环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
||||
# 路由懒加载
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# 页面标题
|
||||
VUE_APP_TITLE = 材料站材料库存管理系统
|
||||
VUE_APP_TITLE = 智慧材料站管理系统
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
# 材料站材料库存管理系统/生产环境-公司
|
||||
# 智慧材料站管理系统/生产环境-公司
|
||||
# VUE_APP_BASE_API = '/prod-api'
|
||||
# 材料站材料库存管理系统/宏源环境
|
||||
# 智慧材料站管理系统/宏源环境
|
||||
VUE_APP_BASE_API = '/iws/clz-api'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# 页面标题
|
||||
VUE_APP_TITLE = 材料站材料库存管理系统
|
||||
VUE_APP_TITLE = 智慧材料站管理系统
|
||||
|
||||
NODE_ENV = production
|
||||
|
||||
# 测试环境配置
|
||||
ENV = 'staging'
|
||||
|
||||
# 材料站材料库存管理系统/测试环境
|
||||
# 智慧材料站管理系统/测试环境
|
||||
VUE_APP_BASE_API = '/stage-api'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "bonus",
|
||||
"version": "3.6.4",
|
||||
"description": "材料站材料库存管理系统",
|
||||
"description": "智慧材料站管理系统",
|
||||
"author": "博诺思",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -160,4 +160,40 @@ export function submitLeaseOutApi(data) {
|
|||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据用户名查询用户信息
|
||||
export function getUserInfoByUserNameApi(data) {
|
||||
return request({
|
||||
url: '/material/app/iwsTeamUser/selectUserInfoByUserName',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据身份证号查询用户信息
|
||||
export function getUserInfoByIdCardApi(data) {
|
||||
return request({
|
||||
url: '/material/app/iwsTeamUser/selectProjectTeamInfoByIdCard',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新班组工程信息
|
||||
export function updateTeamProjectApi(data) {
|
||||
return request({
|
||||
url: '/material/app/iwsTeamUser/updateTeamProject',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取工程ids
|
||||
export function getProjectInfoApi(data) {
|
||||
return request({
|
||||
url: '/material/select/getProjectInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -1,172 +1,625 @@
|
|||
<template>
|
||||
<div class="app-container home">
|
||||
<el-row :gutter="20">
|
||||
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
||||
<h2>材料站材料库存管理系统</h2>
|
||||
<p>
|
||||
<!-- <b>当前版本:</b> <span>v{{ version }}</span> -->
|
||||
</p>
|
||||
<div class="app-container" id="">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
:maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工器具名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
placeholder="请输入工器具名称"
|
||||
clearable
|
||||
:maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModelName">
|
||||
<el-input
|
||||
v-model="queryParams.typeModelName"
|
||||
placeholder="请输入规格型号"
|
||||
clearable
|
||||
:maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出数据</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :sm="24" :lg="12" style="padding-left: 50px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h2>技术选型</h2>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<h4>后端技术</h4>
|
||||
<ul>
|
||||
<li>SpringBoot</li>
|
||||
<li>SpringCloud</li>
|
||||
<li>Nacos</li>
|
||||
<li>Sentinel</li>
|
||||
<li>Seata</li>
|
||||
<li>Minio</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<h4>前端技术</h4>
|
||||
<ul>
|
||||
<li>Vue</li>
|
||||
<li>Vuex</li>
|
||||
<li>Element-ui</li>
|
||||
<li>Axios</li>
|
||||
<li>Echarts</li>
|
||||
<li>Quill</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-divider />
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-col :xs="24" :sm="24" :md="12" :lg="8">
|
||||
<el-card class="update-log">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>联系信息</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<p>
|
||||
<i class="el-icon-s-promotion"></i> 官网:<el-link
|
||||
href="http://www.ahbonus.cn"
|
||||
target="_blank"
|
||||
>http://www.ahbonus.cn</el-link
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
<!-- <el-col :xs="24" :sm="24" :md="12" :lg="8">
|
||||
<el-card class="update-log">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>更新日志</span>
|
||||
</div>
|
||||
<el-collapse accordion>
|
||||
<el-collapse-item title="v24.7.0">
|
||||
<ol>
|
||||
<li>支持多权限字符匹配角色数据权限</li>
|
||||
<li>新增密码最大错误次数/锁定时间</li>
|
||||
<li>登录日志新增解锁账户功能</li>
|
||||
</ol>
|
||||
</el-collapse-item>
|
||||
<el-table v-loading="loading" :data="tableList" :span-method="objectSpanMethod">
|
||||
<!-- houseName type typeName typeModelName unitName storeNum manageType usNum repairNum inputNum repairInputNum allNum-->
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template scope="scope">
|
||||
<span v-if="scope.$index == 0">合计:</span>
|
||||
<span v-else>{{ (queryParams.pageNum - 1) * 10 + scope.$index }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="仓库信息" align="center" prop="whHouseName" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="施工类型" align="center" prop="constructionType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="物资类型" align="center" prop="materialType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="在库数量" align="center" prop="storeNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<!-- 当 manageType 为 '编码' 时,使用可点击的 span -->
|
||||
<span
|
||||
class="clickText"
|
||||
v-if="scope.row.manageType == '编码' && scope.row.storeNum > 0"
|
||||
@click="openRecords(scope.row)"
|
||||
>
|
||||
{{ scope.row.storeNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.storeNum }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
v-if="scope.row.manageType == '编码' && scope.row.usNum > 0"
|
||||
class="clickText"
|
||||
@click="openUserRecords(scope.row)"
|
||||
>
|
||||
{{ scope.row.usNum }}
|
||||
</span>
|
||||
<!-- 否则,直接显示数字 -->
|
||||
<span v-else>
|
||||
{{ scope.row.usNum }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总保有量" align="center" prop="allNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="总保有量资产(万元)" align="center" prop="totalPrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-collapse-item title="v27.7.1">
|
||||
<ol>
|
||||
<li>菜单新增终端管理配置</li>
|
||||
<li>记录登录退出日志信息</li>
|
||||
<li>数据范围过滤属性调整</li>
|
||||
<li>权限部分代码调整</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<!-- 在库编码设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
:maxlength="30"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-download" size="mini" @click="handleDialogStoreExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="dialogList">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
:index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)"
|
||||
></el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="入库数量" align="center" prop="storeNum" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="原值(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="库管员" align="center" prop="maKeeper" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="操作人" align="center" prop="inputUser" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="入库时间" align="center" prop="inputTime" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="入库方式" align="center" prop="inputType" :show-overflow-tooltip="true" /> -->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="dialogTotal > 0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="dialogQuery.pageNum"
|
||||
:limit.sync="dialogQuery.pageSize"
|
||||
@pagination="getStoreCodeList"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 在用编码设备弹窗-->
|
||||
<el-dialog :title="title" :visible.sync="openUseRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogUseQuery" ref="dialogUseQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogUseQuery.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
:maxlength="20"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogUseQuery">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-download" size="mini" @click="handleDialogUserExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="useRecordList">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
:index="indexContinuation(dialogUseQuery.pageNum, dialogUseQuery.pageSize)"
|
||||
></el-table-column>
|
||||
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="在用数量" align="center" prop="usNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="原值(元)" align="center" prop="buyPrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="库管员" align="center" prop="maKeeper" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="操作人" align="center" prop="creator" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="出库时间" align="center" prop="outTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="工程名称"
|
||||
align="center"
|
||||
prop="projectName"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogUserTotal > 0"
|
||||
:total="dialogUserTotal"
|
||||
:page.sync="dialogUseQuery.pageNum"
|
||||
:limit.sync="dialogUseQuery.pageSize"
|
||||
@pagination="getUserRecords"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
// getRetainedEquipmentListApi,
|
||||
// getRetainedEquipmentListNoPageApi,
|
||||
getStorageInfoListApi,
|
||||
getUserRecordListApi,
|
||||
getRepairRecordListApi,
|
||||
getPurchaseRecordListApi,
|
||||
getRepairInputListApi,
|
||||
getToScrapInputListApi,
|
||||
getAuditInputListApi
|
||||
} from '@/api/stquery/stquery'
|
||||
import { getRetainedEquipmentListApi, getRetainedEquipmentListNoPageApi } from '@/api/equipment'
|
||||
import {
|
||||
getProjectInfoApi,
|
||||
getUserInfoByUserNameApi,
|
||||
getUserInfoByIdCardApi,
|
||||
updateTeamProjectApi
|
||||
} from '@/api/lease/apply'
|
||||
export default {
|
||||
name: "Index",
|
||||
name: '',
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
// 版本号
|
||||
version: "24.7.1",
|
||||
};
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 弹出层标题
|
||||
title: '查看',
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 主表格数据
|
||||
tableList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
typeModelName: null //规格型号
|
||||
},
|
||||
|
||||
//在库弹窗
|
||||
openRecord: false,
|
||||
dialogList: [], //在库编码设备列表
|
||||
dialogQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined
|
||||
},
|
||||
dialogTotal: 0,
|
||||
//在用弹窗
|
||||
openUseRecord: false,
|
||||
dialogUseQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: undefined
|
||||
},
|
||||
useRecordList: [], //在用设备列表
|
||||
dialogUserTotal: 0,
|
||||
idCard: '',
|
||||
projectIds: []
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.getList()
|
||||
await Promise.all([this.getUserInfoByUserName(), this.projectInfoList()])
|
||||
this.getUserInfoByIdCard()
|
||||
},
|
||||
methods: {
|
||||
goTarget(href) {
|
||||
window.open(href, "_blank");
|
||||
async getUserInfoByIdCard() {
|
||||
const params = {
|
||||
idCard: this.idCard,
|
||||
projectIds: this.projectIds
|
||||
}
|
||||
console.log('🚀 ~ getUserInfoByIdCard ~ params:', params)
|
||||
try {
|
||||
const res = await getUserInfoByIdCardApi(params)
|
||||
console.log('🚀 ~ getUserInfoByIdCard ~ res:', res)
|
||||
if (res.code === 200 && res.data && res.data.length > 0) {
|
||||
const params = {
|
||||
teamList: res.data
|
||||
}
|
||||
const res2 = await updateTeamProjectApi(params)
|
||||
console.log('🚀 ~ getUserInfoByIdCard ~ res2:', res2)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getUserInfoByIdCard ~ error:', error)
|
||||
}
|
||||
},
|
||||
// 获取用户信息
|
||||
async getUserInfoByUserName() {
|
||||
try {
|
||||
const userName = sessionStorage.getItem('userName')
|
||||
const res = await getUserInfoByUserNameApi({ userName })
|
||||
this.idCard = res.data.idCard
|
||||
sessionStorage.setItem('idCard', res.data.idCard)
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getUserInfoByUserName ~ error:', error)
|
||||
}
|
||||
},
|
||||
async projectInfoList() {
|
||||
try {
|
||||
const res = await getProjectInfoApi({ unitId: null, isApp: true })
|
||||
console.log('🚀 ~ projectInfoList ~ res:', res)
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.projectIds = res.data.map(item => item.projectId)
|
||||
} else {
|
||||
this.projectIds = []
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ projectInfoList ~ error:', error)
|
||||
}
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeName: this.queryParams.typeName,
|
||||
typeModelName: this.queryParams.typeModelName,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum
|
||||
}
|
||||
try {
|
||||
const res = await getRetainedEquipmentListApi(params)
|
||||
if (res.data.rows.length > 0) {
|
||||
this.tableList = res.data.rows
|
||||
} else {
|
||||
this.tableList = []
|
||||
}
|
||||
this.total = res.data.total
|
||||
console.log(this.tableList)
|
||||
let param = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
typeName: this.queryParams.typeName,
|
||||
typeModelName: this.queryParams.typeModelName
|
||||
}
|
||||
const response = await getRetainedEquipmentListNoPageApi(param)
|
||||
let obj = {
|
||||
// storeNum manageType usNum repairNum inputNum repairInputNum allNum
|
||||
storeNum: response.data.storeNum || 0,
|
||||
usNum: response.data.usNum || 0,
|
||||
repairNum: response.data.repairNum || 0,
|
||||
inputNum: response.data.inputNum || 0,
|
||||
repairInputNum: response.data.repairInputNum || 0,
|
||||
pendingScrapNum: response.data.pendingScrapNum || 0,
|
||||
scrapNum: response.data.scrapNum || 0,
|
||||
allNum: response.data.allNum || 0,
|
||||
totalPrice: response.data.totalPrice || 0,
|
||||
fiveReplacementRate: response.data.fiveReplacementRate || 0,
|
||||
tenReplacementRate: response.data.tenReplacementRate || 0,
|
||||
tenPlusReplacementRate: response.data.tenPlusReplacementRate || 0,
|
||||
manageType: response.data.manageType || ''
|
||||
}
|
||||
this.tableList.unshift(obj)
|
||||
console.log(this.tableList)
|
||||
this.loading = false
|
||||
} catch (error) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
indexContinuationForTable(num, size) {
|
||||
let number = (num - 1) * size
|
||||
console.log(number)
|
||||
if (number == 0) {
|
||||
return '合计'
|
||||
} else {
|
||||
return number
|
||||
}
|
||||
},
|
||||
// 合并单元格 rowIndex=行数 columnIndex=列数
|
||||
// 这里是合并table的除表头外的第一行的第二列 + 除表头外的第二行的第二列
|
||||
// 注意列数和行数从 0 开始
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (rowIndex === 0 && columnIndex == 0) {
|
||||
let rowspan = 1
|
||||
let colspan = 6
|
||||
return { rowspan, colspan }
|
||||
}
|
||||
// 解决偏移的重要代码
|
||||
// 重点在 else if 判断必须加因为合并单元格数据会出现偏移、
|
||||
// 否则如果是 第二行 的 第二列 那么隐藏原有第二行 的 第二列的数据使他隐藏
|
||||
else if (rowIndex === 0 && columnIndex < 6) {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportRetainedEquipmentList',
|
||||
{
|
||||
...this.queryParams
|
||||
},
|
||||
`综合查询_保有设备总量_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
//查看在库编码数据
|
||||
openRecords(row) {
|
||||
this.openRecord = true
|
||||
this.dialogQuery.keyWord = ''
|
||||
this.dialogQuery.typeId = row.typeId
|
||||
this.getStoreCodeList()
|
||||
},
|
||||
/** 查询在库编码列表 */
|
||||
getStoreCodeList() {
|
||||
getStorageInfoListApi(this.dialogQuery).then(response => {
|
||||
this.dialogList = response.data.rows
|
||||
this.dialogTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在库按钮操作 */
|
||||
handleDialogQuery() {
|
||||
this.dialogQuery.pageNum = 1
|
||||
this.getStoreCodeList()
|
||||
},
|
||||
handleDialogStoreExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportStorageInfoList',
|
||||
{ ...this.dialogQuery },
|
||||
`综合查询_在库设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
// ------------------
|
||||
//查看在用设备
|
||||
openUserRecords(row) {
|
||||
this.openUseRecord = true
|
||||
this.dialogUseQuery.typeId = row.typeId
|
||||
this.dialogUseQuery.keyWord = ''
|
||||
this.getUserRecords()
|
||||
},
|
||||
/** 查询在用设备列表 */
|
||||
getUserRecords() {
|
||||
getUserRecordListApi(this.dialogUseQuery).then(response => {
|
||||
this.useRecordList = response.data.rows
|
||||
this.dialogUserTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在用按钮操作 */
|
||||
handleDialogUseQuery() {
|
||||
this.dialogUseQuery.pageNum = 1
|
||||
this.getUserRecords()
|
||||
},
|
||||
handleDialogUserExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportUserRecordList',
|
||||
{ ...this.dialogUseQuery },
|
||||
`综合查询_在用设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
// ------------------
|
||||
//查看在修设备
|
||||
openRepairRecords(row) {
|
||||
this.openRepairRecord = true
|
||||
this.dialogRepairQuery.typeId = row.typeId
|
||||
this.dialogRepairQuery.pageNum = 1
|
||||
this.dialogRepairQuery.keyWord = ''
|
||||
this.getRepairRecords()
|
||||
},
|
||||
/** 查询在修设备列表 */
|
||||
getRepairRecords() {
|
||||
getRepairRecordListApi(this.dialogRepairQuery).then(response => {
|
||||
this.repairRecordList = response.data.rows
|
||||
this.dialogRepairTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索在修按钮操作 */
|
||||
handleDialogRepairQuery() {
|
||||
this.dialogRepairQuery.pageNum = 1
|
||||
this.getRepairRecords()
|
||||
},
|
||||
handleDialogRepairExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportRepairRecordList',
|
||||
{ ...this.dialogRepairQuery },
|
||||
`综合查询_在修设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
// ------------------
|
||||
//查看新购入库设备
|
||||
openPurchaseRecords(row) {
|
||||
this.openPurchaseRecord = true
|
||||
this.dialogPurchaseQuery.typeId = row.typeId
|
||||
this.dialogPurchaseQuery.pageNum = 1
|
||||
this.dialogPurchaseQuery.keyWord = ''
|
||||
this.getPurchaseRecords()
|
||||
},
|
||||
/** 查询新购入库设备列表 */
|
||||
getPurchaseRecords() {
|
||||
getPurchaseRecordListApi(this.dialogPurchaseQuery).then(response => {
|
||||
this.purchaseRecordList = response.data.rows
|
||||
this.dialogPurchaseTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索新购入库按钮操作 */
|
||||
handleDialogPurchaseQuery() {
|
||||
this.dialogPurchaseQuery.pageNum = 1
|
||||
this.getPurchaseRecords()
|
||||
},
|
||||
handleDialogPurchaseExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportPurchaseRecordList',
|
||||
{ ...this.dialogPurchaseQuery },
|
||||
`综合查询_新购入库设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
// ------------------
|
||||
//查看修试入库设备
|
||||
openTestedRecords(row) {
|
||||
this.openTestedRecord = true
|
||||
this.dialogTestedQuery.typeId = row.typeId
|
||||
this.dialogTestedQuery.pageNum = 1
|
||||
this.dialogTestedQuery.keyWord = ''
|
||||
this.getTestedRecords()
|
||||
},
|
||||
/** 查询修试入库设备列表 */
|
||||
getTestedRecords() {
|
||||
getRepairInputListApi(this.dialogTestedQuery).then(response => {
|
||||
this.testedRecordList = response.data.rows
|
||||
this.dialogTestedTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索修试入库按钮操作 */
|
||||
handleDialogTestedQuery() {
|
||||
this.dialogTestedQuery.pageNum = 1
|
||||
this.getTestedRecords()
|
||||
},
|
||||
handleDialogTestedExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportRepairInputList',
|
||||
{ ...this.dialogTestedQuery },
|
||||
`综合查询_修试后入库设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.home {
|
||||
blockquote {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px;
|
||||
font-size: 17.5px;
|
||||
border-left: 5px solid #eee;
|
||||
}
|
||||
hr {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
border: 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.col-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
//查看待报废设备
|
||||
openToScrapRecords(row) {
|
||||
this.openToScrapRecord = true
|
||||
this.dialogToScrapQuery.typeId = row.typeId
|
||||
this.dialogToScrapQuery.pageNum = 1
|
||||
this.dialogToScrapQuery.keyWord = ''
|
||||
this.getToScrapRecords()
|
||||
},
|
||||
/** 查询待报废设备列表 */
|
||||
getToScrapRecords() {
|
||||
getToScrapInputListApi(this.dialogToScrapQuery).then(response => {
|
||||
this.toScrapRecordList = response.data.rows
|
||||
this.dialogToScrapTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索待报废按钮操作 */
|
||||
handleDialogToScrapQuery() {
|
||||
this.dialogToScrapQuery.pageNum = 1
|
||||
this.getToScrapRecords()
|
||||
},
|
||||
handleDialogToScrapExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportScrapList',
|
||||
{ ...this.dialogToScrapQuery },
|
||||
`综合查询_待报废设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
},
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
color: #676a6c;
|
||||
overflow-x: hidden;
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 10px;
|
||||
font-size: 26px;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 10px;
|
||||
|
||||
b {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.update-log {
|
||||
ol {
|
||||
display: block;
|
||||
list-style-type: decimal;
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
margin-inline-start: 0;
|
||||
margin-inline-end: 0;
|
||||
padding-inline-start: 40px;
|
||||
//查看已审核报废设备
|
||||
openAuditedRecords(row) {
|
||||
this.openAuditedRecord = true
|
||||
this.dialogAuditedQuery.typeId = row.typeId
|
||||
this.dialogAuditedQuery.pageNum = 1
|
||||
this.dialogAuditedQuery.keyWord = ''
|
||||
this.getAuditedRecords()
|
||||
},
|
||||
/** 查询已审核报废设备列表 */
|
||||
getAuditedRecords() {
|
||||
getAuditInputListApi(this.dialogAuditedQuery).then(response => {
|
||||
this.auditedRecordList = response.data.rows
|
||||
this.dialogAuditedTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 搜索已审核报废按钮操作 */
|
||||
handleDialogAuditedQuery() {
|
||||
this.dialogAuditedQuery.pageNum = 1
|
||||
this.getAuditedRecords()
|
||||
},
|
||||
handleDialogAuditedExport() {
|
||||
this.download(
|
||||
'material/complex_query/exportScrapAuditList',
|
||||
{ ...this.dialogAuditedQuery },
|
||||
`综合查询_已审核报废设备_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.clickText {
|
||||
color: #02a7f0;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<div class="app-container home">
|
||||
<el-row :gutter="20">
|
||||
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
||||
<h2>智慧材料站管理系统</h2>
|
||||
<p>
|
||||
<!-- <b>当前版本:</b> <span>v{{ version }}</span> -->
|
||||
</p>
|
||||
</el-col>
|
||||
<!-- <el-col :sm="24" :lg="12" style="padding-left: 50px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h2>技术选型</h2>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<h4>后端技术</h4>
|
||||
<ul>
|
||||
<li>SpringBoot</li>
|
||||
<li>SpringCloud</li>
|
||||
<li>Nacos</li>
|
||||
<li>Sentinel</li>
|
||||
<li>Seata</li>
|
||||
<li>Minio</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<h4>前端技术</h4>
|
||||
<ul>
|
||||
<li>Vue</li>
|
||||
<li>Vuex</li>
|
||||
<li>Element-ui</li>
|
||||
<li>Axios</li>
|
||||
<li>Echarts</li>
|
||||
<li>Quill</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-divider />
|
||||
<el-row :gutter="20">
|
||||
<!-- <el-col :xs="24" :sm="24" :md="12" :lg="8">
|
||||
<el-card class="update-log">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>联系信息</span>
|
||||
</div>
|
||||
<div class="body">
|
||||
<p>
|
||||
<i class="el-icon-s-promotion"></i> 官网:<el-link
|
||||
href="http://www.ahbonus.cn"
|
||||
target="_blank"
|
||||
>http://www.ahbonus.cn</el-link
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
<!-- <el-col :xs="24" :sm="24" :md="12" :lg="8">
|
||||
<el-card class="update-log">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>更新日志</span>
|
||||
</div>
|
||||
<el-collapse accordion>
|
||||
<el-collapse-item title="v24.7.0">
|
||||
<ol>
|
||||
<li>支持多权限字符匹配角色数据权限</li>
|
||||
<li>新增密码最大错误次数/锁定时间</li>
|
||||
<li>登录日志新增解锁账户功能</li>
|
||||
</ol>
|
||||
</el-collapse-item>
|
||||
|
||||
<el-collapse-item title="v27.7.1">
|
||||
<ol>
|
||||
<li>菜单新增终端管理配置</li>
|
||||
<li>记录登录退出日志信息</li>
|
||||
<li>数据范围过滤属性调整</li>
|
||||
<li>权限部分代码调整</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-card>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Index",
|
||||
data() {
|
||||
return {
|
||||
// 版本号
|
||||
version: "24.7.1",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goTarget(href) {
|
||||
window.open(href, "_blank");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.home {
|
||||
blockquote {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px;
|
||||
font-size: 17.5px;
|
||||
border-left: 5px solid #eee;
|
||||
}
|
||||
hr {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
border: 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.col-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
color: #676a6c;
|
||||
overflow-x: hidden;
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 10px;
|
||||
font-size: 26px;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 10px;
|
||||
|
||||
b {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.update-log {
|
||||
ol {
|
||||
display: block;
|
||||
list-style-type: decimal;
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
margin-inline-start: 0;
|
||||
margin-inline-end: 0;
|
||||
padding-inline-start: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">材料站材料库存管理系统</h3>
|
||||
<h3 class="title">智慧材料站管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="login" v-if="!isIws">
|
||||
<div class="login-form">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">材料站材料库存管理系统</h3>
|
||||
<h3 class="title">智慧材料站管理系统</h3>
|
||||
<template v-if="loginMethod === 'password'">
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
|
|
@ -255,7 +255,7 @@ export default {
|
|||
this.isIws = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '登录中',
|
||||
text: '登录中'
|
||||
})
|
||||
try {
|
||||
const res = await iwsLogin({
|
||||
|
|
@ -334,7 +334,7 @@ export default {
|
|||
this.loginForm.loginMethod = this.loginMethod
|
||||
this.$store
|
||||
.dispatch('Login', this.loginForm)
|
||||
.then(res => {
|
||||
.then(async res => {
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
if (res.isLogin) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="proId">
|
||||
<treeselect
|
||||
<!-- <treeselect
|
||||
v-model="queryParams.proId"
|
||||
:disabled="backId != ''"
|
||||
:options="proList"
|
||||
|
|
@ -43,13 +43,21 @@
|
|||
noResultsText="没有搜索结果"
|
||||
placeholder="请选择退料工程"
|
||||
@select="handleProChange"
|
||||
/>
|
||||
/> -->
|
||||
<el-select v-model="queryParams.proId" placeholder="请选择退料工程" style="width: 240px" @change="handleProChange">
|
||||
<el-option
|
||||
v-for="item in proList"
|
||||
:key="item.id"
|
||||
:label="item.proName"
|
||||
:value="item.proId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组长" prop="backPerson">
|
||||
<el-input
|
||||
v-model="queryParams.backPerson"
|
||||
placeholder="请输入班组长"
|
||||
clearable
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -240,7 +248,7 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件" align="center" prop="file">
|
||||
<!-- <el-table-column label="附件" align="center" prop="file">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-upload
|
||||
|
|
@ -266,7 +274,7 @@
|
|||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="danger" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
|
||||
|
|
@ -347,7 +355,7 @@
|
|||
</el-radio-group> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="附件" align="center" width="120" :show-overflow-tooltip="true">
|
||||
<!-- <el-table-column label="附件" align="center" width="120" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<el-upload
|
||||
|
|
@ -372,7 +380,7 @@
|
|||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
label="文件名称"
|
||||
prop="fileName"
|
||||
|
|
@ -523,13 +531,13 @@ export default {
|
|||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
backPerson: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入班组长',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
// backPerson: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: '请输入班组长',
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ],
|
||||
// backTime: [
|
||||
// {
|
||||
// required: true,
|
||||
|
|
@ -592,7 +600,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
// this.GetProData()
|
||||
if (this.backId) {
|
||||
//编辑
|
||||
this.rowId = this.backId
|
||||
|
|
@ -641,9 +649,10 @@ export default {
|
|||
},
|
||||
changeTeam(val) {
|
||||
console.log('🚀 ~ changeTeam ~ val:', val, this.queryParams)
|
||||
setTimeout(() => {
|
||||
this.GetAgreementInfoById()
|
||||
}, 300)
|
||||
const team = this.teamList.find(item => item.id === val)
|
||||
this.queryParams.backPerson = team ? team.relName : ''
|
||||
this.queryParams.teamName = team ? team.teamName : ''
|
||||
this.GetProData()
|
||||
},
|
||||
handleProChange(val) {
|
||||
console.log('🚀 ~ handleProChange ~ val:', val, this.queryParams)
|
||||
|
|
@ -656,23 +665,9 @@ export default {
|
|||
const res = await getBmTeamApi({ isAll: 0 })
|
||||
this.teamList = res.data
|
||||
},
|
||||
unitChange(val) {
|
||||
// if(val&&val.length>0){
|
||||
// this.queryParams.unitId=this.unitId[this.unitId.length - 1]
|
||||
// }else if(val&&val.length==0){
|
||||
// this.queryParams.unitId=""
|
||||
// }
|
||||
// this.GetProData()
|
||||
setTimeout(() => {
|
||||
this.GetProData()
|
||||
}, 500)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId
|
||||
}
|
||||
const res = await getProjectList({})
|
||||
const res = await getProjectList({unitId: null, isApp: true, teamName: this.queryParams.teamName})
|
||||
this.proList = res.data
|
||||
this.queryParams.proId = null
|
||||
this.GetAgreementInfoById()
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||
<el-form-item label="领用班组" prop="teamId">
|
||||
<el-select
|
||||
v-if="!isEdit"
|
||||
v-model="maForm.teamId"
|
||||
:disabled="isEdit"
|
||||
placeholder="请选择班组"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change=""
|
||||
@change="changeTeam"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in uniteList"
|
||||
|
|
@ -20,9 +19,10 @@
|
|||
:data-key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-else v-model="maForm.teamName" disabled maxlength="50" style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<treeselect
|
||||
<!-- <treeselect
|
||||
v-model="maForm.projectId"
|
||||
:disabled="isEdit"
|
||||
:options="projectList"
|
||||
|
|
@ -34,16 +34,25 @@
|
|||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
placeholder="请选择租赁工程"
|
||||
/>
|
||||
/> -->
|
||||
<el-select
|
||||
v-if="!isEdit || !maForm.teamId"
|
||||
v-model="maForm.projectId"
|
||||
placeholder="请选择租赁工程"
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
||||
</el-select>
|
||||
<el-input v-else v-model="maForm.projectName" disabled maxlength="50" style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组长" prop="leasePerson">
|
||||
<el-input
|
||||
v-model="maForm.leasePerson"
|
||||
placeholder="请输入班组长"
|
||||
clearable
|
||||
disabled
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -292,7 +301,9 @@ export default {
|
|||
},
|
||||
maForm: {
|
||||
teamId: undefined,
|
||||
teamName: '',
|
||||
projectId: undefined,
|
||||
projectName: '',
|
||||
arrivalTime: '',
|
||||
purchaser: '',
|
||||
remark: '',
|
||||
|
|
@ -323,13 +334,13 @@ export default {
|
|||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
leasePerson: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入班组长',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
// leasePerson: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: '请输入班组长',
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ],
|
||||
phone: [
|
||||
// { required: true, message: '联系电话不能为空', trigger: 'blur' },
|
||||
{
|
||||
|
|
@ -398,8 +409,8 @@ export default {
|
|||
uploadUrl: process.env.VUE_APP_BASE_API + '/file/upload' // 上传的图片服务器地址
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.projectInfoList() //单位工程下拉选
|
||||
async mounted() {
|
||||
// this.projectInfoList() //单位工程下拉选
|
||||
// this.equipmentType() //机具类型下拉选
|
||||
this.getStandardConfigListApi() //标准配置下拉选
|
||||
if (this.isEdit) {
|
||||
|
|
@ -407,6 +418,8 @@ export default {
|
|||
this.taskId = this.editTaskId
|
||||
this.id = this.editId
|
||||
this.getTaskInfo()
|
||||
} else {
|
||||
this.getBmTeam()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -444,24 +457,41 @@ export default {
|
|||
children: node.children
|
||||
}
|
||||
},
|
||||
/** 租赁单位和工程-下拉选 */
|
||||
projectInfoList() {
|
||||
if (!this.isEdit) {
|
||||
getBmTeamApi({ isAll: 0 }).then(response => {
|
||||
this.uniteList = response.data
|
||||
})
|
||||
getListProject({ unitId: null }).then(response => {
|
||||
this.projectList = response.data
|
||||
})
|
||||
} else {
|
||||
getBmTeamApi({ isAll: 0 }).then(response => {
|
||||
this.uniteList = response.data
|
||||
})
|
||||
getListProject({ unitId: null }).then(response => {
|
||||
this.projectList = response.data
|
||||
})
|
||||
// 获取班组
|
||||
async getBmTeam() {
|
||||
try {
|
||||
const teamLeaderIdCard = sessionStorage.getItem('idCard')
|
||||
const res = await getBmTeamApi({ isAll: 0, teamLeaderIdCard })
|
||||
if (!res.data || res.data.length === 0) return
|
||||
this.uniteList = res.data
|
||||
this.maForm.teamId = res.data[0].id
|
||||
this.maForm.teamName = res.data[0].teamName
|
||||
this.maForm.leasePerson = res.data[0].relName
|
||||
this.projectInfoList()
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getBmTeam ~ error:', error)
|
||||
}
|
||||
},
|
||||
/** 工程-下拉选 */
|
||||
async projectInfoList() {
|
||||
try {
|
||||
const res = await getListProject({ unitId: null, isApp: true, teamName: this.maForm.teamName })
|
||||
this.projectList = res.data
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ projectInfoList ~ error:', error)
|
||||
}
|
||||
},
|
||||
changeTeam(e) {
|
||||
console.log('🚀 ~ changeTeam ~ e:', e)
|
||||
this.maForm.projectId = null
|
||||
this.maForm.projectName = null
|
||||
// 查找对应的teamName
|
||||
const team = this.uniteList.find(item => item.id === e)
|
||||
this.maForm.teamName = team ? team.teamName : ''
|
||||
this.maForm.leasePerson = team ? team.relName : ''
|
||||
console.log('🚀 ~ changeTeam ~ this.maForm.teamName:', this.maForm.teamName)
|
||||
this.projectInfoList()
|
||||
},
|
||||
/** 机具类型 */
|
||||
equipmentType() {
|
||||
equipmentTypeTree().then(response => {
|
||||
|
|
@ -648,26 +678,30 @@ export default {
|
|||
if (this.equipmentList.length > 0) {
|
||||
this.$refs['maForm'].validate(async valid => {
|
||||
if (valid) {
|
||||
// for (let i = 0; i < this.equipmentList.length; i++) {
|
||||
// if (this.equipmentList[i].preNum <= 0) {
|
||||
// this.$message.error(`第 ${i + 1} 行的 ${'预领数量必须大于0'} `)
|
||||
// return
|
||||
// }
|
||||
// if (this.equipmentList[i].preNum > this.equipmentList[i].storageNum) {
|
||||
// this.$message.error(`第 ${i + 1} 行的 ${'预领数量不可大于库存量'} `)
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
for (let i = 0; i < this.equipmentList.length; i++) {
|
||||
if (this.equipmentList[i].preNum <= 0) {
|
||||
this.$message.error(`第 ${i + 1} 行的 ${'预领数量必须大于0'} `)
|
||||
return
|
||||
}
|
||||
if (this.equipmentList[i].preNum > this.equipmentList[i].storageNum) {
|
||||
this.$message.error(`第 ${i + 1} 行的 ${'预领数量不可大于库存量'} `)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
console.log('projectId', this.projectTemp)
|
||||
this.maForm.taskId = this.taskId
|
||||
// this.maForm.checkDetailsList = this.equipmentList
|
||||
this.equipmentList.forEach(item => {
|
||||
item.maCodeList = []
|
||||
})
|
||||
this.maForm.isOut = 0
|
||||
this.maForm.createBy = sessionStorage.getItem('userName')
|
||||
await this.$modal
|
||||
.confirm('是否确认保存当前页面')
|
||||
.then(function () {})
|
||||
.then(() => {
|
||||
if (this.isEdit) {
|
||||
this.maForm.isOut = 0
|
||||
this.maForm.leaseProjectId = this.maForm.projectId
|
||||
console.log('编辑')
|
||||
this.loading = true
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@
|
|||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||
<el-form-item label="领用班组" prop="teamId">
|
||||
<el-select
|
||||
v-if="!isEdit"
|
||||
v-model="maForm.teamId"
|
||||
:disabled="isEdit"
|
||||
placeholder="请选择班组"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change=""
|
||||
@change="changeTeam"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in uniteList"
|
||||
|
|
@ -20,9 +19,10 @@
|
|||
:data-key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-else v-model="maForm.teamName" disabled maxlength="50" style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<treeselect
|
||||
<!-- <treeselect
|
||||
v-model="maForm.projectId"
|
||||
:disabled="isEdit"
|
||||
:options="projectList"
|
||||
|
|
@ -34,17 +34,26 @@
|
|||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
placeholder="请选择租赁工程"
|
||||
/>
|
||||
/> -->
|
||||
<el-select
|
||||
v-if="!isEdit"
|
||||
v-model="maForm.projectId"
|
||||
:disabled="isEdit || !maForm.teamId"
|
||||
placeholder="请选择租赁工程"
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option v-for="(item, index) in projectList" :key="index" :label="item.proName" :value="item.proId" />
|
||||
</el-select>
|
||||
<el-input v-else v-model="maForm.projectName" disabled maxlength="50" style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组长" prop="leasePerson">
|
||||
<el-input
|
||||
v-model="maForm.leasePerson"
|
||||
placeholder="请输入班组长"
|
||||
:disabled="isEdit"
|
||||
clearable
|
||||
disabled
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -195,7 +204,9 @@
|
|||
: (scope.row.outNum = Number(v.replace(/[^\d]/g, '')))
|
||||
"
|
||||
></el-input>
|
||||
<el-button v-else size="mini" type="text" @click="handleOutCode(scope.row)">{{ scope.row.outNum }}</el-button>
|
||||
<el-button v-else size="mini" type="text" @click="handleOutCode(scope.row)">
|
||||
{{ scope.row.maCodeList ? scope.row.maCodeList.length : 0 }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="管理模式" prop="manageType" align="center">
|
||||
|
|
@ -323,7 +334,9 @@ export default {
|
|||
},
|
||||
maForm: {
|
||||
teamId: undefined,
|
||||
teamName: '',
|
||||
projectId: undefined,
|
||||
projectName: '',
|
||||
arrivalTime: '',
|
||||
purchaser: '',
|
||||
remark: '',
|
||||
|
|
@ -354,13 +367,13 @@ export default {
|
|||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
leasePerson: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入班组长',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
// leasePerson: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: '请输入班组长',
|
||||
// trigger: 'blur'
|
||||
// }
|
||||
// ],
|
||||
phone: [
|
||||
// { required: true, message: '联系电话不能为空', trigger: 'blur' },
|
||||
{
|
||||
|
|
@ -431,13 +444,15 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.projectInfoList() //单位工程下拉选
|
||||
// this.projectInfoList() //单位工程下拉选
|
||||
this.getStandardConfigListApi() //标准配置下拉选
|
||||
if (this.isEdit) {
|
||||
console.log('isEdit', this.isEdit)
|
||||
this.taskId = this.editTaskId
|
||||
this.id = this.editId
|
||||
this.getTaskInfo()
|
||||
} else {
|
||||
this.getBmTeam()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -475,22 +490,39 @@ export default {
|
|||
children: node.children
|
||||
}
|
||||
},
|
||||
// 获取班组
|
||||
async getBmTeam() {
|
||||
try {
|
||||
const teamLeaderIdCard = sessionStorage.getItem('idCard')
|
||||
const res = await getBmTeamApi({ isAll: 0, teamLeaderIdCard })
|
||||
if (!res.data || res.data.length === 0) return
|
||||
this.uniteList = res.data
|
||||
this.maForm.teamId = res.data[0].id
|
||||
this.maForm.teamName = res.data[0].teamName
|
||||
this.maForm.leasePerson = res.data[0].relName
|
||||
this.projectInfoList()
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getBmTeam ~ error:', error)
|
||||
}
|
||||
},
|
||||
changeTeam(e) {
|
||||
console.log('🚀 ~ changeTeam ~ e:', e)
|
||||
this.maForm.projectId = null
|
||||
this.maForm.projectName = null
|
||||
// 查找对应的teamName
|
||||
const team = this.uniteList.find(item => item.id === e)
|
||||
this.maForm.teamName = team ? team.teamName : ''
|
||||
this.maForm.leasePerson = team ? team.relName : ''
|
||||
console.log('🚀 ~ changeTeam ~ this.maForm.teamName:', this.maForm.teamName)
|
||||
this.projectInfoList()
|
||||
},
|
||||
/** 租赁单位和工程-下拉选 */
|
||||
projectInfoList() {
|
||||
if (!this.isEdit) {
|
||||
getBmTeamApi({ isAll: 0 }).then(response => {
|
||||
this.uniteList = response.data
|
||||
})
|
||||
getListProject({ unitId: null }).then(response => {
|
||||
this.projectList = response.data
|
||||
})
|
||||
} else {
|
||||
getBmTeamApi({ isAll: 0 }).then(response => {
|
||||
this.uniteList = response.data
|
||||
})
|
||||
getListProject({ unitId: null }).then(response => {
|
||||
this.projectList = response.data
|
||||
})
|
||||
async projectInfoList() {
|
||||
try {
|
||||
const res = await getListProject({ unitId: null, isApp: true, teamName: this.maForm.teamName })
|
||||
this.projectList = res.data
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ projectInfoList ~ error:', error)
|
||||
}
|
||||
},
|
||||
/** 机具类型 */
|
||||
|
|
@ -581,7 +613,8 @@ export default {
|
|||
...typeData,
|
||||
preNum: 0,
|
||||
outNum: 0,
|
||||
parentId: this.parentId
|
||||
parentId: this.parentId,
|
||||
maCodeList: []
|
||||
})
|
||||
this.deviceType.push(lastSelected)
|
||||
this.$message({
|
||||
|
|
@ -699,7 +732,10 @@ export default {
|
|||
if (this.equipmentList[i].outNum > this.equipmentList[i].storageNum) {
|
||||
this.$message.error(`第 ${i + 1} 行的 ${'出库数量不可大于库存量'} `)
|
||||
return
|
||||
} else if (this.equipmentList[i].outNum == 0) {
|
||||
} else if (
|
||||
this.equipmentList[i].outNum == 0 ||
|
||||
(this.equipmentList[i].manageType == 0 && this.equipmentList[i].maCodeList.length == 0)
|
||||
) {
|
||||
this.$message.error(`第 ${i + 1} 行 ${'请输入出库数量'} `)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
v-if="scope.row.taskStatus == 1"
|
||||
v-hasPermi="['purchase:info:edit']"
|
||||
>
|
||||
编辑
|
||||
出库
|
||||
</el-button>
|
||||
<el-button size="mini" type="warning" v-if="scope.row.taskStatus != 1" @click="handleLld(scope.row)">
|
||||
领料单
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="register">
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">材料站材料库存管理系统</h3>
|
||||
<h3 class="title">智慧材料站管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container">
|
||||
<div class="register">
|
||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">材料站材料库存管理系统</h3>
|
||||
<h3 class="title">智慧材料站管理系统</h3>
|
||||
|
||||
<el-form-item prop="nickName">
|
||||
<el-input v-model="registerForm.nickName" type="text" auto-complete="off" placeholder="请输入姓名">
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
|||
|
||||
const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '材料站材料库存管理系统' // 网页标题
|
||||
const name = process.env.VUE_APP_TITLE || '智慧材料站管理系统' // 网页标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue