优化流程
This commit is contained in:
parent
8731cdc995
commit
1272ccda12
|
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<div class="app-container" id="receiveOut">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="领料单号" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
|
|
@ -11,17 +18,41 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="unitId">
|
||||
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitList" filterable :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select
|
||||
v-model="queryParams.unitId"
|
||||
placeholder="请选择单位名称"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
filterable
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-select v-model="queryParams.proId" filterable clearable placeholder="请选择工程名称">
|
||||
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select
|
||||
v-model="queryParams.proId"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择工程名称"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in proList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库状态" prop="taskStatus">
|
||||
<el-select v-model="queryParams.taskStatus" placeholder="请选择出库状态" clearable>
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择出库状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
filterable
|
||||
|
|
@ -33,28 +64,71 @@
|
|||
</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-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-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="leaseList">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料单号" align="center" prop="code" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料申请单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料申请工程" align="center" prop="proName" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="领料单号"
|
||||
align="center"
|
||||
prop="code"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="领料申请单位"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="领料申请工程"
|
||||
align="center"
|
||||
prop="proName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="申请数量"
|
||||
align="center"
|
||||
|
|
@ -67,13 +141,34 @@
|
|||
prop="createTimes"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="出库状态" align="center" prop="taskName" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column
|
||||
label="已出库数量"
|
||||
align="center"
|
||||
prop="alNum"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="出库状态"
|
||||
align="center"
|
||||
prop="taskName"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button size="mini" type="primary" v-if="scope.row.taskStatus != 35" @click="handleOut(scope.row)">
|
||||
<el-button size="mini" @click="handleView(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="scope.row.taskStatus != 35"
|
||||
@click="handleOut(scope.row)"
|
||||
>
|
||||
出库
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -89,8 +184,19 @@
|
|||
/>
|
||||
|
||||
<!-- 出库弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openLeaseDevices" width="1200px" append-to-body>
|
||||
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openLeaseDevices"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="dialogQuery"
|
||||
ref="dialogQuery"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="设备负责人" prop="userName">
|
||||
<el-input v-model="dialogQuery.userName" maxlength="20" />
|
||||
</el-form-item>
|
||||
|
|
@ -108,35 +214,90 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleDialogQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetDialogQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="dialogList" height="600">
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{ (dialogQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
<span>{{
|
||||
(dialogQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</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="outNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备负责人" align="center" prop="userName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!isView">
|
||||
<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="outNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="已出库数量"
|
||||
align="center"
|
||||
prop="alNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备负责人"
|
||||
align="center"
|
||||
prop="userName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
v-if="!isView"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="codeOut(scope.row)"
|
||||
v-if="scope.row.manageType == 0 && scope.row.outNum != 0"
|
||||
v-if="
|
||||
scope.row.manageType == 0 &&
|
||||
scope.row.outNum != 0
|
||||
"
|
||||
>
|
||||
编码出库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="(scope.row.manageType == 1 || scope.row.manageType == 2) && scope.row.outNum != 0"
|
||||
v-if="
|
||||
(scope.row.manageType == 1 ||
|
||||
scope.row.manageType == 2) &&
|
||||
scope.row.outNum != 0
|
||||
"
|
||||
@click="numOut(scope.row)"
|
||||
>
|
||||
数量出库
|
||||
|
|
@ -155,40 +316,109 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 编码出库 -->
|
||||
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body>
|
||||
<el-form :model="codeOutForm" ref="codeOutForm" size="small" :inline="true" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openCode"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="codeOutForm"
|
||||
ref="codeOutForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<span style="margin-right: 50px">待出库数量:{{ outNum }}</span>
|
||||
<el-form-item label="请输入车牌号" prop="carCode">
|
||||
<el-input v-model="codeOutForm.carCode" maxlength="20" />
|
||||
</el-form-item>
|
||||
<span style="margin-right: 50px; color: red">部分设备出库时,需进行装车,需记录车牌号码</span>
|
||||
<span style="margin-right: 50px; color: red"
|
||||
>部分设备出库时,需进行装车,需记录车牌号码</span
|
||||
>
|
||||
</el-form>
|
||||
|
||||
<el-form :model="outQuery" ref="outQuery" size="small" :inline="true" label-width="100px">
|
||||
<el-form
|
||||
:model="outQuery"
|
||||
ref="outQuery"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="设备编码" prop="maCode">
|
||||
<el-input v-model="outQuery.maCode" maxlength="20" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleOutQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetOutQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleOutQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetOutQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" size="mini" @click="saveCodeOut">出库</el-button>
|
||||
<el-button type="primary" size="mini" @click="saveCodeOut"
|
||||
>出库</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="outCodeList" height="500" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="outCodeList"
|
||||
height="500"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{ (outQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
<span>{{
|
||||
(outQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</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="maCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备状态" align="center" prop="maStatus" :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="maCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备状态"
|
||||
align="center"
|
||||
prop="maStatus"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
@ -201,29 +431,73 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 数量出库 -->
|
||||
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
|
||||
<el-form :model="numOutForm" ref="numOutForm" size="small" :inline="true" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openNum"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="numOutForm"
|
||||
ref="numOutForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- <span style="margin-right: 50px;">
|
||||
待出库数量:{{outNum}}
|
||||
</span>-->
|
||||
<el-form-item label="请输入车牌号" prop="carCode">
|
||||
<el-input v-model="numOutForm.carCode" maxlength="20" />
|
||||
</el-form-item>
|
||||
<span style="margin-right: 50px; color: red">部分设备出库时,需进行装车,需记录车牌号码</span>
|
||||
<span style="margin-right: 50px; color: red"
|
||||
>部分设备出库时,需进行装车,需记录车牌号码</span
|
||||
>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" size="mini" @click="saveNumOut">出库</el-button>
|
||||
<el-button type="primary" size="mini" @click="saveNumOut"
|
||||
>出库</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="outNumList" height="500">
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<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="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="出库数量" align="center" prop="inputNum">
|
||||
<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="num"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="待出库数量"
|
||||
align="center"
|
||||
prop="outNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="已出库数量"
|
||||
align="center"
|
||||
prop="alNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库数量"
|
||||
align="center"
|
||||
prop="inputNum"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.inputNum"
|
||||
|
|
@ -344,34 +618,39 @@ export default {
|
|||
methods: {
|
||||
//获取单位
|
||||
getUnitList() {
|
||||
getUnitData().then(response => {
|
||||
getUnitData().then((response) => {
|
||||
this.unitList = response.data
|
||||
})
|
||||
},
|
||||
//获取单位
|
||||
getProList() {
|
||||
getProData().then(response => {
|
||||
getProData().then((response) => {
|
||||
this.proList = response.data
|
||||
})
|
||||
},
|
||||
getTypeList() {
|
||||
getTypeList({ level: '3' }).then(response => {
|
||||
getTypeList({ level: '3' }).then((response) => {
|
||||
this.typeList = response.data
|
||||
})
|
||||
},
|
||||
//规格型号
|
||||
equipmentType() {
|
||||
equipmentTypeTree().then(response => {
|
||||
equipmentTypeTree().then((response) => {
|
||||
this.equipmentTypeList = response.data
|
||||
this.equipmentTypeList.forEach((item, index) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((item2, index2) => {
|
||||
if (item2.children && item2.children.length > 0) {
|
||||
item2.children.forEach(item3 => {
|
||||
if (item3.children && item3.children.length > 0) {
|
||||
item3.children.forEach(item4 => {
|
||||
item4.machineTypeName = item3.typeName
|
||||
item4.specificationType = item4.typeName
|
||||
item2.children.forEach((item3) => {
|
||||
if (
|
||||
item3.children &&
|
||||
item3.children.length > 0
|
||||
) {
|
||||
item3.children.forEach((item4) => {
|
||||
item4.machineTypeName =
|
||||
item3.typeName
|
||||
item4.specificationType =
|
||||
item4.typeName
|
||||
// this.$set(item4, 'purchasePrice', 0);
|
||||
// this.$set(item4, 'purchaseNum', 1);
|
||||
})
|
||||
|
|
@ -396,7 +675,7 @@ export default {
|
|||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getLeaseAuditList(this.queryParams).then(response => {
|
||||
getLeaseAuditList(this.queryParams).then((response) => {
|
||||
this.leaseList = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
|
@ -413,7 +692,7 @@ export default {
|
|||
/** 查询列表 */
|
||||
getDialogList() {
|
||||
// console.log(this.dialogQuery)
|
||||
getLeaseAuditListDetail(this.dialogQuery).then(response => {
|
||||
getLeaseAuditListDetail(this.dialogQuery).then((response) => {
|
||||
this.dialogList = response.data.rows
|
||||
this.dialogTotal = response.data.total
|
||||
})
|
||||
|
|
@ -474,7 +753,7 @@ export default {
|
|||
this.handleOutQuery()
|
||||
},
|
||||
getCodeList() {
|
||||
getDetailsByTypeId(this.outQuery).then(response => {
|
||||
getDetailsByTypeId(this.outQuery).then((response) => {
|
||||
this.outCodeList = response.data.rows
|
||||
if (response.data.total) {
|
||||
this.outTotal = response.data.total
|
||||
|
|
@ -483,7 +762,7 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.maCodeList = selection.map(item => item.maId)
|
||||
this.maCodeList = selection.map((item) => item.maId)
|
||||
},
|
||||
selectable(row) {
|
||||
console.log(row)
|
||||
|
|
@ -496,7 +775,7 @@ export default {
|
|||
//编码出库保存
|
||||
saveCodeOut() {
|
||||
if (this.maCodeList.length <= this.outObj.outNum) {
|
||||
let params = this.maCodeList.map(item => {
|
||||
let params = this.maCodeList.map((item) => {
|
||||
let obj = {
|
||||
id: this.outObj.id,
|
||||
maId: item,
|
||||
|
|
@ -510,7 +789,7 @@ export default {
|
|||
return obj
|
||||
})
|
||||
// console.log(params)
|
||||
submitOut(params).then(response => {
|
||||
submitOut(params).then((response) => {
|
||||
this.$modal.msgSuccess('出库成功')
|
||||
this.openCode = false
|
||||
this.handleDialogQuery()
|
||||
|
|
@ -524,7 +803,7 @@ export default {
|
|||
saveNumOut() {
|
||||
this.outNumList[0].carCode = this.numOutForm.carCode
|
||||
let param = this.outNumList
|
||||
submitNumOut(param).then(response => {
|
||||
submitNumOut(param).then((response) => {
|
||||
this.$modal.msgSuccess('出库成功')
|
||||
this.openNum = false
|
||||
this.handleDialogQuery()
|
||||
|
|
@ -552,7 +831,7 @@ export default {
|
|||
this.downloadJson(
|
||||
'base/tm_task/export',
|
||||
JSON.stringify(this.queryParams),
|
||||
`领料出库_${new Date().getTime()}.xlsx`
|
||||
`领料出库_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,92 +1,268 @@
|
|||
<template>
|
||||
<div class="app-container" id="newDevicesWarehousing">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable maxlength="50" style="width: 240px"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<el-select v-model="queryParams.typeId" placeholder="请选择设备类型" clearable filterable style="width: 240px">
|
||||
<el-option v-for="typeItem in typesList" :key="typeItem.typeId" :label="typeItem.typeName"
|
||||
:value="typeItem.typeId" />
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-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"
|
||||
v-hasPermi="['system:dict:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableList">
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购单号" align="center" prop="code" :show-overflow-tooltip="true" width="160" />
|
||||
<el-table-column label="采购日期" align="center" prop="purchaseTime" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="到货日期" align="center" prop="arrivalTime" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="采购机具设备" align="center" prop="purchasingTypeName" :show-overflow-tooltip="true"
|
||||
width="250" />
|
||||
<el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="入库人员" align="center" prop="updateBy" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="入库时间" align="center" prop="updateTime" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="发布时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="采购单号"
|
||||
align="center"
|
||||
prop="code"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购日期"
|
||||
align="center"
|
||||
prop="purchaseTime"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="到货日期"
|
||||
align="center"
|
||||
prop="arrivalTime"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购机具设备"
|
||||
align="center"
|
||||
prop="purchasingTypeName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购员"
|
||||
align="center"
|
||||
prop="purchaserName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库人员"
|
||||
align="center"
|
||||
prop="updateBy"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库时间"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="发布时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="状态" align="center" prop="taskStatus">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.taskStatus == '26'">已验收合格</span>
|
||||
<span v-if="scope.row.taskStatus == '28'">已审核</span>
|
||||
<span v-if="scope.row.taskStatus == '105'">待审核</span>
|
||||
<span v-if="scope.row.taskStatus == '107'">已驳回</span>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="scope.row.taskStatus == '26'"
|
||||
>已验收合格</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="scope.row.taskStatus == '28'"
|
||||
>已审核</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="warning"
|
||||
v-if="scope.row.taskStatus == '105'"
|
||||
>待审核</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="scope.row.taskStatus == '107'"
|
||||
>已驳回</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" icon="el-icon-zoom-in" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" v-if="
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.taskStatus == '26' ||
|
||||
scope.row.taskStatus == '105'
|
||||
" @click="handleUpdate(scope.row)">审核</el-button>
|
||||
<el-button size="mini" type="info" icon="el-icon-edit" v-if="scope.row.taskStatus == '28'"
|
||||
@click="handlePrint(scope.row)">入库单</el-button>
|
||||
"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>审核</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.taskStatus == '28'"
|
||||
@click="handlePrint(scope.row)"
|
||||
>入库单</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!--审批对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form :model="query" ref="query" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="query"
|
||||
ref="query"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="dictName">
|
||||
<el-input v-model="query.dictName" placeholder="请输入关键字" clearable maxlength="50" style="width: 240px"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
<el-input
|
||||
v-model="query.dictName"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleDialogQuery"
|
||||
>查询</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" v-if="showHandle">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain size="mini" :disabled="multiple" @click="passAll">批量通过</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="passAll"
|
||||
>批量通过</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain size="mini" @click="refusedAll" :disabled="multiple">批量不通过</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
@click="refusedAll"
|
||||
:disabled="multiple"
|
||||
>批量不通过</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
|
|
@ -99,24 +275,67 @@
|
|||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="detailTableList" @selection-change="handleSelectionChange" height="400">
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="detailTableList"
|
||||
height="600"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{ (query.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
<span>{{
|
||||
(query.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机具类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="编号" align="center" prop="maCode" :show-overflow-tooltip="true" width="200" />
|
||||
<el-table-column label="管理模式" align="center" prop="manageType">
|
||||
<el-table-column
|
||||
label="机具类型"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="specificationType"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
align="center"
|
||||
prop="checkNum"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="编号"
|
||||
align="center"
|
||||
prop="maCode"
|
||||
show-overflow-tooltip
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="管理模式"
|
||||
align="center"
|
||||
prop="manageType"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType == '0'">编码管理</span>
|
||||
<span v-if="scope.row.manageType == '1'">数量管理</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="不通过原因" align="center" prop="remark" :show-overflow-tooltip="true" /> -->
|
||||
<!-- <el-table-column label="不通过原因" align="center" prop="remark" show-overflow-tooltip /> -->
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == '0'">未入库</span>
|
||||
|
|
@ -125,32 +344,65 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="showHandle" width="150">
|
||||
<template slot-scope="scope" v-if="
|
||||
scope.row.manageType == '1' || scope.row.manageType == '2' ||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
v-if="showHandle"
|
||||
width="150"
|
||||
>
|
||||
<template
|
||||
slot-scope="scope"
|
||||
v-if="
|
||||
scope.row.manageType == '1' ||
|
||||
scope.row.manageType == '2' ||
|
||||
(scope.row.manageType == '0' && scope.row.maCode)
|
||||
">
|
||||
<el-button size="mini" type="text" v-if="scope.row.status == '0'" @click="pass(scope.row)">通过</el-button>
|
||||
<el-button size="mini" type="text" v-if="scope.row.status == '0'"
|
||||
@click="refused(scope.row)">不通过</el-button>
|
||||
"
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0'"
|
||||
@click="pass(scope.row)"
|
||||
>通过</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0'"
|
||||
@click="refused(scope.row)"
|
||||
>不通过</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="dialogTotal > 0" :total="dialogTotal" :page.sync="query.pageNum" :limit.sync="query.pageSize"
|
||||
@pagination="getDialogTable" />
|
||||
<pagination
|
||||
v-show="dialogTotal > 0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="query.pageNum"
|
||||
:limit.sync="query.pageSize"
|
||||
@pagination="getDialogTable"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 入库单弹窗 -->
|
||||
<el-dialog :visible.sync="openPrint" width="900px" append-to-body>
|
||||
<div style="height: 600px; overflow-y: scroll">
|
||||
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
|
||||
<div class="title" style="
|
||||
<div
|
||||
class="title"
|
||||
style="
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
">入库单</div>
|
||||
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
|
||||
"
|
||||
>入库单</div
|
||||
>
|
||||
<div
|
||||
class="info"
|
||||
style="margin-top: 10px; display: flex; flex-wrap: wrap"
|
||||
>
|
||||
<!-- <div
|
||||
class="item"
|
||||
style="
|
||||
|
|
@ -162,12 +414,15 @@
|
|||
>
|
||||
<span>工程名称:</span>
|
||||
</div> -->
|
||||
<div class="item" style="
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
">
|
||||
"
|
||||
>
|
||||
<span>日期:</span>
|
||||
</div>
|
||||
<!-- <div
|
||||
|
|
@ -193,26 +448,58 @@
|
|||
<span>车辆信息:</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<el-table :data="printTableData" class="table" style="
|
||||
<el-table
|
||||
:data="printTableData"
|
||||
class="table"
|
||||
style="
|
||||
margin-top: 20px;
|
||||
padding-bottom: 1px;
|
||||
padding-right: 1px;
|
||||
" border>
|
||||
"
|
||||
border
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="类型名称" align="center" prop="typeName" />
|
||||
<el-table-column label="规格型号" align="center" prop="specificationType" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" />
|
||||
<el-table-column label="数量" align="center" prop="checkNum" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
/>
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="specificationType"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
align="center"
|
||||
prop="checkNum"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
/>
|
||||
<!-- <el-table-column label="出库方式" align="center" prop="manageTypeName" /> -->
|
||||
</el-table>
|
||||
|
||||
<div class="fillIn" style="
|
||||
<div
|
||||
class="fillIn"
|
||||
style="
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
">
|
||||
"
|
||||
>
|
||||
<div class="item" style="width: 25%">
|
||||
<span>审核:</span>
|
||||
</div>
|
||||
|
|
@ -240,7 +527,12 @@
|
|||
|
||||
<script>
|
||||
import { getTypeList } from '@/api/store/warehousing'
|
||||
import { getPutInList, getPutinDetailsList, changePutinStatus, warehousingEntry } from '@/api/store/newBuy'
|
||||
import {
|
||||
getPutInList,
|
||||
getPutinDetailsList,
|
||||
changePutinStatus,
|
||||
warehousingEntry,
|
||||
} from '@/api/store/newBuy'
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
export default {
|
||||
// name: "NewDevicesWarehousing",
|
||||
|
|
@ -320,14 +612,14 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getTypeList() {
|
||||
getTypeList({ level: '3' }).then(response => {
|
||||
getTypeList({ level: '3' }).then((response) => {
|
||||
this.typesList = response.data
|
||||
})
|
||||
},
|
||||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getPutInList(this.queryParams).then(response => {
|
||||
getPutInList(this.queryParams).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
|
|
@ -336,7 +628,7 @@ export default {
|
|||
|
||||
getDialogTable() {
|
||||
this.loading = true
|
||||
getPutinDetailsList(this.query).then(response => {
|
||||
getPutinDetailsList(this.query).then((response) => {
|
||||
this.detailTableList = response.rows
|
||||
this.dialogTotal = response.total
|
||||
this.loading = false
|
||||
|
|
@ -378,7 +670,10 @@ export default {
|
|||
selectable(row) {
|
||||
console.log(row)
|
||||
if (row.status == '0') {
|
||||
if ((row.manageType == '0' && row.maCode) || row.manageType == '1') {
|
||||
if (
|
||||
(row.manageType == '0' && row.maCode) ||
|
||||
row.manageType == '1'
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
|
@ -389,7 +684,7 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item)
|
||||
this.ids = selection.map((item) => item)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
|
@ -422,7 +717,7 @@ export default {
|
|||
checkResult: '1',
|
||||
inputRecordList: [obj],
|
||||
}
|
||||
changePutinStatus(param).then(response => {
|
||||
changePutinStatus(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('审批成功')
|
||||
this.getDialogTable()
|
||||
|
|
@ -435,7 +730,7 @@ export default {
|
|||
passAll() {
|
||||
console.log(this.query.taskId)
|
||||
console.log(this.ids)
|
||||
this.ids.forEach(item => {
|
||||
this.ids.forEach((item) => {
|
||||
item.taskId = this.query.taskId
|
||||
item.typeId = item.typeId
|
||||
item.maId = item.maId
|
||||
|
|
@ -447,7 +742,7 @@ export default {
|
|||
checkResult: '1',
|
||||
inputRecordList: this.ids,
|
||||
}
|
||||
changePutinStatus(param).then(response => {
|
||||
changePutinStatus(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('审批成功')
|
||||
this.getDialogTable()
|
||||
|
|
@ -475,7 +770,7 @@ export default {
|
|||
checkResult: '2',
|
||||
inputRecordList: [obj],
|
||||
}
|
||||
changePutinStatus(param).then(response => {
|
||||
changePutinStatus(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('审批成功')
|
||||
this.getDialogTable()
|
||||
|
|
@ -488,7 +783,7 @@ export default {
|
|||
refusedAll() {
|
||||
console.log(this.query.taskId)
|
||||
console.log(this.ids)
|
||||
this.ids.forEach(item => {
|
||||
this.ids.forEach((item) => {
|
||||
item.taskId = this.query.taskId
|
||||
item.typeId = item.typeId
|
||||
item.maId = item.maId
|
||||
|
|
@ -501,7 +796,7 @@ export default {
|
|||
inputRecordList: this.ids,
|
||||
}
|
||||
|
||||
changePutinStatus(param).then(response => {
|
||||
changePutinStatus(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('审批成功')
|
||||
this.getDialogTable()
|
||||
|
|
@ -521,7 +816,7 @@ export default {
|
|||
},
|
||||
//获取入库单数据
|
||||
getPrintTable(taskId) {
|
||||
warehousingEntry({ taskId: taskId }).then(response => {
|
||||
warehousingEntry({ taskId: taskId }).then((response) => {
|
||||
this.printTableData = response.data
|
||||
// this.dialogTotal = response.total;
|
||||
})
|
||||
|
|
@ -544,7 +839,7 @@ export default {
|
|||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`新购工机具入库_${new Date().getTime()}.xlsx`
|
||||
`新购工机具入库_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -50,14 +50,32 @@
|
|||
</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-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
|
|
@ -69,57 +87,98 @@
|
|||
>导出
|
||||
</el-button>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" height="600" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="名称" align="center" key="typeName" prop="typeName" />
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="typeList"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!-- <el-table-column
|
||||
type="selection"
|
||||
width="50"
|
||||
align="center"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
key="typeName"
|
||||
prop="typeName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitName"
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="内部租赁价"
|
||||
align="center"
|
||||
key="leasePrice"
|
||||
prop="leasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="原值" align="center" key="buyPrice" prop="buyPrice" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="原值"
|
||||
align="center"
|
||||
key="buyPrice"
|
||||
prop="buyPrice"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="丢失赔偿"
|
||||
align="center"
|
||||
key="payPrice"
|
||||
prop="payPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="库管员"
|
||||
align="center"
|
||||
key="keeperUserName"
|
||||
prop="keeperUserName"
|
||||
:show-overflow-tooltip="true"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="管理模式"
|
||||
align="center"
|
||||
key="manageType"
|
||||
prop="manageType"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType == '0'">编码管理</span>
|
||||
<span v-if="scope.row.manageType == '1'">数量管理</span>
|
||||
<template slot-scope="{ row }">
|
||||
<el-tag size="mini" v-if="row.manageType == '0'">
|
||||
编码管理
|
||||
</el-tag>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="row.manageType == '1'"
|
||||
>
|
||||
数量管理
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图片" align="center" key="photoName" prop="photoName" :show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="图片"
|
||||
align="center"
|
||||
key="photoName"
|
||||
prop="photoName"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span @click="openImg(scope.row.photoUrl)" style="color: #02a7f0">{{ scope.row.photoName }}</span>
|
||||
<span
|
||||
@click="openImg(scope.row.photoUrl)"
|
||||
style="color: #02a7f0; cursor: pointer"
|
||||
>{{ scope.row.photoName }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -127,10 +186,14 @@
|
|||
align="center"
|
||||
key="documentName"
|
||||
prop="documentName"
|
||||
:show-overflow-tooltip="true"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a :href="uploadUrl + scope.row.documentUrl" style="color: #02a7f0" :download="scope.row.documentName">
|
||||
<a
|
||||
:href="uploadUrl + scope.row.documentUrl"
|
||||
style="color: #02a7f0; cursor: pointer"
|
||||
:download="scope.row.documentName"
|
||||
>
|
||||
{{ scope.row.documentName }}
|
||||
</a>
|
||||
</template>
|
||||
|
|
@ -140,27 +203,50 @@
|
|||
align="center"
|
||||
key="propName"
|
||||
prop="propName"
|
||||
:show-overflow-tooltip="true"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家规格型号"
|
||||
align="center"
|
||||
key="facModel"
|
||||
prop="facModel"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注信息"
|
||||
align="center"
|
||||
key="remark"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="备注信息" align="center" key="remark" prop="remark" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope" v-if="scope.row.typeId !== 1">
|
||||
<el-button size="mini" type="success" icon="el-icon-edit" @click="handleConfig(scope.row)">
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template
|
||||
slot-scope="scope"
|
||||
v-if="scope.row.typeId !== 1"
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleConfig(scope.row)"
|
||||
>
|
||||
配置
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleUpdate(scope.row)">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -178,8 +264,19 @@
|
|||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="850px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属上级" prop="parentId">
|
||||
|
|
@ -187,14 +284,22 @@
|
|||
v-model="form.parentId"
|
||||
:options="treeOptions"
|
||||
:show-count="true"
|
||||
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||
noChildrenText="没有数据了"
|
||||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
placeholder="请选择所属上级分类"
|
||||
@select="treeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="维修员" prop="repairUserId">
|
||||
<el-select v-model="form.repairUserId" filterable placeholder="请选择维修员">
|
||||
<el-select
|
||||
v-model="form.repairUserId"
|
||||
filterable
|
||||
placeholder="请选择维修员"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="keeper in repairUserList"
|
||||
:key="keeper.userId"
|
||||
|
|
@ -208,14 +313,27 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="typeName">
|
||||
<el-input v-model="form.typeName" placeholder="请输入名称" maxlength="30" />
|
||||
<el-input
|
||||
v-model="form.typeName"
|
||||
placeholder="请输入名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="管理模式" prop="manageType">
|
||||
<el-select v-model="form.manageType" filterable placeholder="请选择管理模式">
|
||||
<el-option value="0" label="编码管理">编码管理</el-option>
|
||||
<el-option value="1" label="数量管理">数量管理</el-option>
|
||||
<el-select
|
||||
v-model="form.manageType"
|
||||
filterable
|
||||
placeholder="请选择管理模式"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option value="0" label="编码管理"
|
||||
>编码管理</el-option
|
||||
>
|
||||
<el-option value="1" label="数量管理"
|
||||
>数量管理</el-option
|
||||
>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -224,13 +342,23 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="内部租赁价" prop="leasePrice">
|
||||
<el-input v-model="form.leasePrice" type="number" placeholder="请输入租赁价格" maxlength="10" />
|
||||
<el-input
|
||||
v-model="form.leasePrice"
|
||||
type="number"
|
||||
placeholder="请输入租赁价格"
|
||||
maxlength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="外部租赁价" prop="rentPrice">
|
||||
<el-input v-model="form.rentPrice" type="number" placeholder="请输入外部租赁价" maxlength="30" />
|
||||
<el-input
|
||||
v-model="form.rentPrice"
|
||||
type="number"
|
||||
placeholder="请输入外部租赁价"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -238,19 +366,33 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原值" prop="buyPrice">
|
||||
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30" />
|
||||
<el-input
|
||||
v-model="form.buyPrice"
|
||||
type="number"
|
||||
placeholder="请输入原值"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计量单位" prop="unitName">
|
||||
<el-input v-model="form.unitName" placeholder="请输入计量单位" maxlength="20" />
|
||||
<el-input
|
||||
v-model="form.unitName"
|
||||
placeholder="请输入计量单位"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="资产属性" prop="propId">
|
||||
<el-select v-model="form.propId" filterable placeholder="请选择资产属性">
|
||||
<el-select
|
||||
v-model="form.propId"
|
||||
filterable
|
||||
placeholder="请选择资产属性"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="keeper in propList"
|
||||
:key="keeper.propId"
|
||||
|
|
@ -263,7 +405,12 @@
|
|||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库管员" prop="keeperUserId">
|
||||
<el-select v-model="form.keeperUserId" filterable placeholder="请选择库管员">
|
||||
<el-select
|
||||
v-model="form.keeperUserId"
|
||||
filterable
|
||||
placeholder="请选择库管员"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="keeper in keeperList"
|
||||
:key="keeper.userId"
|
||||
|
|
@ -277,12 +424,21 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂家规格型号" prop="facModel">
|
||||
<el-input v-model="form.facModel" placeholder="请输入厂家规格型号" maxlength="100"></el-input>
|
||||
<el-input
|
||||
v-model="form.facModel"
|
||||
placeholder="请输入厂家规格型号"
|
||||
maxlength="100"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注内容" maxlength="150"></el-input>
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入备注内容"
|
||||
maxlength="150"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -295,17 +451,26 @@
|
|||
action="#"
|
||||
:limit="1"
|
||||
accept=".docx, .pdf"
|
||||
:http-request="obj => fileUpLoad(obj, 'fileUrl')"
|
||||
:http-request="
|
||||
(obj) => fileUpLoad(obj, 'fileUrl')
|
||||
"
|
||||
:on-exceed="exceedFile"
|
||||
>
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-upload"
|
||||
>点击上传</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="图片" prop="photoName">
|
||||
<el-upload
|
||||
:http-request="obj => imgUpLoad(obj, 'fileUrl')"
|
||||
:http-request="
|
||||
(obj) => imgUpLoad(obj, 'fileUrl')
|
||||
"
|
||||
action="#"
|
||||
:file-list="fileList"
|
||||
list-type="picture-card"
|
||||
|
|
@ -316,8 +481,16 @@
|
|||
:on-remove="handleRemove"
|
||||
>
|
||||
<!-- <el-button size="small" type="primary" icon="el-icon-upload">上传</el-button> -->
|
||||
<img v-if="imageUrl" :src="uploadUrl + imageUrl" style="width: 140px; height: 140px" class="avatar" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<img
|
||||
v-if="imageUrl"
|
||||
:src="uploadUrl + imageUrl"
|
||||
style="width: 140px; height: 140px"
|
||||
class="avatar"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -334,12 +507,27 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 配置弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="configOpen" width="650px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="cform" :model="cform" :rules="crules" label-width="110px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="configOpen"
|
||||
width="650px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
ref="cform"
|
||||
:model="cform"
|
||||
:rules="crules"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="调整前价格">
|
||||
<el-input v-model="leasePrice" placeholder="调整前价格" disabled></el-input>
|
||||
<el-input
|
||||
v-model="leasePrice"
|
||||
placeholder="调整前价格"
|
||||
disabled
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -371,7 +559,9 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitConfig">确 定</el-button>
|
||||
<el-button type="primary" @click="submitConfig"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancelConfig">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -379,21 +569,16 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listUser,
|
||||
getUser,
|
||||
delUser,
|
||||
addUser,
|
||||
updateUser,
|
||||
// resetUserPwd,
|
||||
// changeUserStatus,
|
||||
deptTreeSelect,
|
||||
} from '@/api/system/user'
|
||||
|
||||
import { getToken } from '@/utils/auth'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { getListByMaType, getMaTypeList, getMaType, addMaType, updateMaType, delMaType } from '@/api/store/tools'
|
||||
import {
|
||||
getListByMaType,
|
||||
getMaTypeList,
|
||||
getMaType,
|
||||
addMaType,
|
||||
updateMaType,
|
||||
delMaType,
|
||||
} from '@/api/store/tools'
|
||||
import { getUserByRoleList } from '@/api/system/user'
|
||||
import { getProLists } from '@/api/base/base'
|
||||
import { imgUpLoad, fileUpLoad } from '@/api/system/upload'
|
||||
|
|
@ -441,7 +626,9 @@ export default {
|
|||
// 角色选项
|
||||
roleOptions: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
companyId: '',
|
||||
},
|
||||
chosenTypeId: '',
|
||||
leasePrice: '',
|
||||
uploadHeader: process.env.VUE_APP_BASE_API,
|
||||
|
|
@ -472,7 +659,11 @@ export default {
|
|||
// 表单校验
|
||||
rules: {
|
||||
typeName: [
|
||||
{ required: true, message: '设备名称不能为空', trigger: 'blur' },
|
||||
{
|
||||
required: true,
|
||||
message: '设备名称不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
min: 2,
|
||||
max: 20,
|
||||
|
|
@ -480,9 +671,27 @@ export default {
|
|||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
parentId: [{ required: true, message: '所属上级不能为空', trigger: 'blur' }],
|
||||
manageType: [{ required: true, message: '请选择管理模式', trigger: 'change' }],
|
||||
leasePrice:[{required: true, message: '内部租赁价格不能为空', trigger: 'blur' }]
|
||||
parentId: [
|
||||
{
|
||||
required: true,
|
||||
message: '所属上级不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
manageType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择管理模式',
|
||||
trigger: 'change',
|
||||
},
|
||||
],
|
||||
leasePrice: [
|
||||
{
|
||||
required: true,
|
||||
message: '内部租赁价格不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
// password: [
|
||||
// {required: true, message: "用户密码不能为空", trigger: "blur"},
|
||||
// {min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
|
||||
|
|
@ -513,7 +722,11 @@ export default {
|
|||
},
|
||||
crules: {
|
||||
leasePrice: [
|
||||
{ required: true, message: '调整后价格不能为空', trigger: 'blur' },
|
||||
{
|
||||
required: true,
|
||||
message: '调整后价格不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
// { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
// effTime: [
|
||||
|
|
@ -529,43 +742,44 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
// this.getInfo()
|
||||
this.getList()
|
||||
this.getTreeData()
|
||||
this.getUserList()
|
||||
this.getPropData()
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
getInfo().then(res => {
|
||||
this.companyId = res.user.companyId
|
||||
})
|
||||
},
|
||||
// getInfo() {
|
||||
// getInfo().then((res) => {
|
||||
// console.log(res, 'companyId----')
|
||||
// this.companyId = res.user.companyId
|
||||
// })
|
||||
// },
|
||||
/** 查询用户列表--库管员,维修员 */
|
||||
getUserList() {
|
||||
getUserByRoleList({ roleId: '101' }).then(response => {
|
||||
getUserByRoleList({ roleId: '101' }).then((response) => {
|
||||
this.keeperList = response.data
|
||||
})
|
||||
getUserByRoleList({ roleId: '102' }).then(response => {
|
||||
getUserByRoleList({ roleId: '102' }).then((response) => {
|
||||
this.repairUserList = response.data
|
||||
})
|
||||
},
|
||||
/** 查询新增页面-上级类型下拉树结构 */
|
||||
getTreeData() {
|
||||
getMaTypeList().then(response => {
|
||||
getMaTypeList().then((response) => {
|
||||
this.treeOptions = response.data
|
||||
})
|
||||
},
|
||||
/** 查询资产属性下拉 */
|
||||
getPropData() {
|
||||
getProLists().then(response => {
|
||||
getProLists().then((response) => {
|
||||
this.propList = response.rows
|
||||
})
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getListByMaType(this.queryParams).then(response => {
|
||||
getListByMaType(this.queryParams).then((response) => {
|
||||
this.typeList = response.data
|
||||
// this.total = response.total;
|
||||
this.loading = false
|
||||
|
|
@ -614,7 +828,7 @@ export default {
|
|||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.typeId)
|
||||
this.ids = selection.map((item) => item.typeId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
|
@ -628,7 +842,7 @@ export default {
|
|||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const typeId = row.typeId || this.ids
|
||||
getMaType(typeId).then(response => {
|
||||
getMaType(typeId).then((response) => {
|
||||
this.form = response.data
|
||||
if (this.form.documentUrl) {
|
||||
let file = {
|
||||
|
|
@ -647,19 +861,19 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
console.log(this.form)
|
||||
this.$refs['form'].validate(valid => {
|
||||
console.log(this.form, '提交参数---')
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.typeId != undefined) {
|
||||
updateMaType(this.form).then(response => {
|
||||
updateMaType(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
this.getTreeData()
|
||||
})
|
||||
} else {
|
||||
this.form.companyId = this.companyId
|
||||
addMaType(this.form).then(response => {
|
||||
// this.form.companyId = this.companyId
|
||||
addMaType(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
|
|
@ -700,9 +914,9 @@ export default {
|
|||
leasePrice: this.cform.leasePrice,
|
||||
}
|
||||
console.log(param)
|
||||
this.$refs['cform'].validate(valid => {
|
||||
this.$refs['cform'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateMaType(param).then(response => {
|
||||
updateMaType(param).then((response) => {
|
||||
this.$modal.msgSuccess('调整成功')
|
||||
this.configOpen = false
|
||||
this.getList()
|
||||
|
|
@ -720,7 +934,7 @@ export default {
|
|||
console.log(param, 'image')
|
||||
param.type = 'ma'
|
||||
imgUpLoad(param)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.form.photoUrl = res.data.fileUrl
|
||||
this.form.photoName = res.data.fileName
|
||||
|
|
@ -731,7 +945,7 @@ export default {
|
|||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
.catch((error) => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error)
|
||||
})
|
||||
|
|
@ -761,7 +975,7 @@ export default {
|
|||
console.log(param, 'fileUpLoad')
|
||||
param.type = 'ma'
|
||||
imgUpLoad(param)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.form.documentUrl = res.data.fileUrl
|
||||
this.form.documentName = res.data.fileName
|
||||
|
|
@ -772,13 +986,17 @@ export default {
|
|||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
.catch((error) => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error)
|
||||
})
|
||||
},
|
||||
exceedFile(files, fileList) {
|
||||
this.$message.warning(`只能选择 1 个文件导入,共选择了 ${files.length + fileList.length} 个文件`)
|
||||
this.$message.warning(
|
||||
`只能选择 1 个文件导入,共选择了 ${
|
||||
files.length + fileList.length
|
||||
} 个文件`,
|
||||
)
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
|
@ -787,6 +1005,13 @@ export default {
|
|||
// ...this.queryParams
|
||||
// }, `user_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
/* 树节点操作 */
|
||||
treeChange(val) {
|
||||
console.log(val, '树节点')
|
||||
|
||||
this.form.companyId = val.companyId
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue