由阿胡
This commit is contained in:
parent
8e964622fb
commit
83863f7e22
|
|
@ -132,7 +132,7 @@
|
|||
data() {
|
||||
return {
|
||||
total: 0,
|
||||
tableList: [],
|
||||
tableList: [{ demo: 123 }],
|
||||
/* 分页参数 */
|
||||
pageParams: {
|
||||
pageNum: 1,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
<template>
|
||||
<div class="app-container" id="returnInDetail">
|
||||
<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="keyword">
|
||||
<el-input
|
||||
v-model="queryParams.keyword"
|
||||
|
|
@ -12,7 +19,13 @@
|
|||
</el-form-item>-->
|
||||
|
||||
<el-form-item label="类型名称" prop="typeId">
|
||||
<el-select v-model="queryParams.typeId" placeholder="请选择类型名称" clearable filterable style="width: 240px">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择类型名称"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typeList"
|
||||
:key="typeItem.typeId"
|
||||
|
|
@ -36,53 +49,131 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" :loading="loading">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
:loading="loading"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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 icon="el-icon-back" size="mini" @click="back">返回</el-button>
|
||||
<el-button icon="el-icon-back" size="mini" @click="back"
|
||||
>返回</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="!isView">
|
||||
<el-button type="primary" size="mini" @click="completeBack">完成退料</el-button>
|
||||
<el-button type="primary" size="mini" @click="completeBack"
|
||||
>完成退料</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="deviceList">
|
||||
<!-- <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="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column type="expand" v-if="isView">
|
||||
<template slot-scope="scope">
|
||||
<div class="nested-table-container">
|
||||
<el-table :data="scope.row.maTypeDetails" style="width: 100%">
|
||||
<el-table
|
||||
:data="scope.row.maTypeDetails"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- 子表格的列 -->
|
||||
<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="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="预领数量" align="center" prop="partNum" :show-overflow-tooltip="true" />
|
||||
<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="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="预领数量"
|
||||
align="center"
|
||||
prop="partNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请数量" align="center" prop="preNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="申请数量"
|
||||
align="center"
|
||||
prop="preNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料数量"
|
||||
align="center"
|
||||
prop="num"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="300"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleViewCode(scope.row)"
|
||||
v-if="scope.row.manageType == '0' || scope.row.manageType == '1' || scope.row.manageType == '2'"
|
||||
v-if="
|
||||
scope.row.manageType == '0' ||
|
||||
scope.row.manageType == '1' ||
|
||||
scope.row.manageType == '2'
|
||||
"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
|
|
@ -95,7 +186,11 @@
|
|||
size="mini"
|
||||
type="primary"
|
||||
@click="handleCodeReturn(scope.row)"
|
||||
v-if="!isView && scope.row.manageType == '0' && scope.row.num > 0"
|
||||
v-if="
|
||||
!isView &&
|
||||
scope.row.manageType == '0' &&
|
||||
scope.row.num > 0
|
||||
"
|
||||
>
|
||||
编码退料
|
||||
</el-button>
|
||||
|
|
@ -103,7 +198,12 @@
|
|||
size="mini"
|
||||
type="primary"
|
||||
@click="handleNumReturn(scope.row)"
|
||||
v-if="!isView && (scope.row.manageType == '1' || scope.row.manageType == '2') && scope.row.num > 0"
|
||||
v-if="
|
||||
!isView &&
|
||||
(scope.row.manageType == '1' ||
|
||||
scope.row.manageType == '2') &&
|
||||
scope.row.num > 0
|
||||
"
|
||||
>
|
||||
数量退料
|
||||
</el-button>
|
||||
|
|
@ -128,40 +228,114 @@
|
|||
/>
|
||||
|
||||
<!-- 编码退料弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body>
|
||||
<div style="margin-left: 40px; margin-bottom: 10px">退料数量:{{ returnNum }}</div>
|
||||
<el-form :model="codeQuery" ref="codeQuery" size="small" :inline="true" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openCode"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<div style="margin-left: 40px; margin-bottom: 10px"
|
||||
>退料数量:{{ returnNum }}</div
|
||||
>
|
||||
<el-form
|
||||
:model="codeQuery"
|
||||
ref="codeQuery"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="设备编码" prop="maCode">
|
||||
<el-input v-model="codeQuery.maCode" maxlength="20" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleCodeQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetCodeQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleCodeQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetCodeQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" size="mini" :disabled="multiple" @click="saveCodeBackBatch(1)">批量合格</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="saveCodeBackBatch(1)"
|
||||
>批量合格</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" size="mini" :disabled="multiple" @click="saveCodeBackBatch(2)">批量维修</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="saveCodeBackBatch(2)"
|
||||
>批量维修</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" size="mini" :disabled="multiple" @click="saveCodeBackBatch(3)">批量报废</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="saveCodeBackBatch(3)"
|
||||
>批量报废</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="codeList" height="500" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="codeList"
|
||||
height="500"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<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>{{ (codeQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
<span>{{
|
||||
(codeQuery.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-column
|
||||
label="操作"
|
||||
align="center"
|
||||
|
|
@ -170,9 +344,24 @@
|
|||
width="250"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="success" @click="saveCodeBack(scope.row, 1)">合格</el-button>
|
||||
<el-button size="mini" type="primary" @click="saveCodeBack(scope.row, 2)">待维修</el-button>
|
||||
<el-button size="mini" type="warning" @click="saveCodeBack(scope.row, 3)">预报废</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="saveCodeBack(scope.row, 1)"
|
||||
>合格</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="saveCodeBack(scope.row, 2)"
|
||||
>待维修</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="saveCodeBack(scope.row, 3)"
|
||||
>预报废</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -186,22 +375,54 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 数量退料弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openNum"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<div v-if="dialogData.typeMange == 1">
|
||||
<div style="margin-left: 40px; margin-bottom: 10px">退料数量:{{ returnNum }}</div>
|
||||
<div style="margin-left: 40px; margin-bottom: 10px"
|
||||
>退料数量:{{ returnNum }}</div
|
||||
>
|
||||
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" size="mini" v-if="returnNum > 0" @click="saveNumReturn(dialogData.typeMange)">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="returnNum > 0"
|
||||
@click="saveNumReturn(dialogData.typeMange)"
|
||||
>
|
||||
保存
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="numList" 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="typeCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料数量"
|
||||
align="center"
|
||||
prop="backNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="合格数量"
|
||||
align="center"
|
||||
prop="qualifiedNum"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.qualifiedNum"
|
||||
|
|
@ -214,7 +435,12 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="待维修数量"
|
||||
align="center"
|
||||
prop="serviceNum"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.serviceNum"
|
||||
|
|
@ -227,7 +453,11 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待报废数量" align="center" prop="scrapNum">
|
||||
<el-table-column
|
||||
label="待报废数量"
|
||||
align="center"
|
||||
prop="scrapNum"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.scrapNum"
|
||||
|
|
@ -245,11 +475,18 @@
|
|||
</div>
|
||||
<div v-else>
|
||||
<div style="margin-bottom: 30px">
|
||||
接收抱杆类型:{{ dialogData.typeName }},型号:{{ dialogData.typeCode }},付数:{{ returnNum }}。接收明细如下
|
||||
接收抱杆类型:{{ dialogData.typeName }},型号:{{
|
||||
dialogData.typeCode
|
||||
}},付数:{{ returnNum }}。接收明细如下
|
||||
</div>
|
||||
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" size="mini" v-if="returnNum > 0" @click="saveNumReturn(dialogData.typeMange)">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="returnNum > 0"
|
||||
@click="saveNumReturn(dialogData.typeMange)"
|
||||
>
|
||||
保存
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
|
@ -257,11 +494,36 @@
|
|||
<el-table :data="dialogData.maTypeDetails" style="width: 100%">
|
||||
<!-- 子表格的列 -->
|
||||
<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="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="应退数量" align="center" prop="partNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :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="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="应退数量"
|
||||
align="center"
|
||||
prop="partNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="合格数量"
|
||||
align="center"
|
||||
prop="qualifiedNum"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.qualifiedNum"
|
||||
|
|
@ -274,7 +536,12 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="待维修数量"
|
||||
align="center"
|
||||
prop="serviceNum"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.serviceNum"
|
||||
|
|
@ -287,7 +554,11 @@
|
|||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待报废数量" align="center" prop="scrapNum">
|
||||
<el-table-column
|
||||
label="待报废数量"
|
||||
align="center"
|
||||
prop="scrapNum"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.scrapNum"
|
||||
|
|
@ -307,7 +578,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
import {
|
||||
receiveView,
|
||||
getBackMachine,
|
||||
backReceiveRecordWeb,
|
||||
|
|
@ -316,13 +587,13 @@ import {
|
|||
getRecord,
|
||||
endBack,
|
||||
revoke,
|
||||
} from '@/api/claimAndRefund/return'
|
||||
import { getTypeList } from '@/api/store/warehousing'
|
||||
import { equipmentTypeTree } from '@/api/store/tools'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { getInfo } from '@/api/login'
|
||||
export default {
|
||||
} from '@/api/claimAndRefund/return'
|
||||
import { getTypeList } from '@/api/store/warehousing'
|
||||
import { equipmentTypeTree } from '@/api/store/tools'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { getInfo } from '@/api/login'
|
||||
export default {
|
||||
// name: "returnInDetail",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
|
|
@ -399,32 +670,48 @@ export default {
|
|||
|
||||
this.getList()
|
||||
|
||||
getInfo().then(res => {
|
||||
getInfo().then((res) => {
|
||||
this.createBy = res.user.userId
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//机具类型
|
||||
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
|
||||
this.$set(item4, 'purchasePrice', 0)
|
||||
this.$set(item4, 'purchaseNum', 1)
|
||||
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
|
||||
this.$set(
|
||||
item4,
|
||||
'purchasePrice',
|
||||
0,
|
||||
)
|
||||
this.$set(
|
||||
item4,
|
||||
'purchaseNum',
|
||||
1,
|
||||
)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -438,7 +725,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
receiveView(this.queryParams)
|
||||
.then(response => {
|
||||
.then((response) => {
|
||||
this.deviceList = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
|
@ -473,7 +760,7 @@ export default {
|
|||
parentId: this.queryParams.id,
|
||||
taskId: this.queryParams.taskId,
|
||||
}
|
||||
endBack(param).then(response => {
|
||||
endBack(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
this.back()
|
||||
|
|
@ -488,13 +775,13 @@ export default {
|
|||
parentId: row.id,
|
||||
typeId: row.modelId,
|
||||
}
|
||||
backReceiveRecordWeb(param).then(res => {
|
||||
backReceiveRecordWeb(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.title = '查看'
|
||||
this.openNum = true
|
||||
this.dialogIsView = true
|
||||
this.numList = res.data.rows
|
||||
this.numList.forEach(item => {
|
||||
this.numList.forEach((item) => {
|
||||
if (item.backStatus == '1') {
|
||||
item.qualifiedNum = item.backNum
|
||||
item.serviceNum = 0
|
||||
|
|
@ -524,28 +811,35 @@ export default {
|
|||
this.handleCodeQuery()
|
||||
} else if (row.manageType == '2') {
|
||||
this.handleNumReturn(row)
|
||||
const modelIdsJoined = row.maTypeDetails.map(item => item.modelId).join(',')
|
||||
const modelIdsJoined = row.maTypeDetails
|
||||
.map((item) => item.modelId)
|
||||
.join(',')
|
||||
let param = {
|
||||
parentId: row.id,
|
||||
typeId: modelIdsJoined,
|
||||
}
|
||||
backReceiveRecordWeb(param).then(res => {
|
||||
backReceiveRecordWeb(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.title = '查看'
|
||||
this.openNum = true
|
||||
this.dialogIsView = true
|
||||
this.dialogData.maTypeDetails.map(itemA => {
|
||||
const matchingItemB = res.data.rows.find(itemB => itemA.modelId === itemB.modelId)
|
||||
this.dialogData.maTypeDetails.map((itemA) => {
|
||||
const matchingItemB = res.data.rows.find(
|
||||
(itemB) => itemA.modelId === itemB.modelId,
|
||||
)
|
||||
if (matchingItemB) {
|
||||
switch (matchingItemB.backStatus) {
|
||||
case '1':
|
||||
itemA.qualifiedNum = matchingItemB.backNum
|
||||
itemA.qualifiedNum =
|
||||
matchingItemB.backNum
|
||||
break
|
||||
case '2':
|
||||
itemA.serviceNum = matchingItemB.backNum
|
||||
itemA.serviceNum =
|
||||
matchingItemB.backNum
|
||||
break
|
||||
case '3':
|
||||
itemA.scrapNum = matchingItemB.backNum
|
||||
itemA.scrapNum =
|
||||
matchingItemB.backNum
|
||||
break
|
||||
default:
|
||||
}
|
||||
|
|
@ -578,7 +872,7 @@ export default {
|
|||
this.dialogData.typeName = row.typeName
|
||||
this.dialogData.typeCode = row.typeCode
|
||||
if (row.maTypeDetails) {
|
||||
row.maTypeDetails.forEach(item => {
|
||||
row.maTypeDetails.forEach((item) => {
|
||||
this.$set(item, 'qualifiedNum', undefined)
|
||||
this.$set(item, 'serviceNum', undefined)
|
||||
this.$set(item, 'scrapNum', undefined)
|
||||
|
|
@ -597,7 +891,7 @@ export default {
|
|||
manageType: row.manageType,
|
||||
createBy: this.createBy,
|
||||
}
|
||||
revoke(param).then(response => {
|
||||
revoke(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
this.handleQuery()
|
||||
|
|
@ -620,17 +914,17 @@ export default {
|
|||
},
|
||||
//获取退料编码列表
|
||||
getCodeList() {
|
||||
getBackMachine(this.codeQuery).then(response => {
|
||||
getBackMachine(this.codeQuery).then((response) => {
|
||||
this.codeList = response.data.rows
|
||||
this.codeTotal = response.data.total
|
||||
})
|
||||
},
|
||||
//获取退料编码查看列表
|
||||
getCodeViewList() {
|
||||
backReceiveRecordWeb(this.codeQuery).then(response => {
|
||||
backReceiveRecordWeb(this.codeQuery).then((response) => {
|
||||
this.codeList = response.data.rows
|
||||
this.codeList
|
||||
this.codeList.forEach(item => {
|
||||
this.codeList.forEach((item) => {
|
||||
item.typeModelName = item.typeCode
|
||||
if (item.backStatus == '1') {
|
||||
item.maStatus = '合格'
|
||||
|
|
@ -658,7 +952,10 @@ export default {
|
|||
}
|
||||
let arr = []
|
||||
for (const item of data) {
|
||||
let sumUnmber = (item.qualifiedNum || 0) + (item.serviceNum || 0) + (item.scrapNum || 0)
|
||||
let sumUnmber =
|
||||
(item.qualifiedNum || 0) +
|
||||
(item.serviceNum || 0) +
|
||||
(item.scrapNum || 0)
|
||||
if (sumUnmber > item.partNum && sumUnmber > item.num) {
|
||||
this.$modal.msgError('退料总量已大于待退料数量!')
|
||||
return
|
||||
|
|
@ -702,7 +999,7 @@ export default {
|
|||
taskId: taskId,
|
||||
arr: arr,
|
||||
}
|
||||
setNumBack(param).then(response => {
|
||||
setNumBack(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
this.openNum = false
|
||||
|
|
@ -730,7 +1027,7 @@ export default {
|
|||
taskId: this.codeQuery.taskId,
|
||||
arr: arr,
|
||||
}
|
||||
setCodeBack(param).then(response => {
|
||||
setCodeBack(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
// this.openCode = false;
|
||||
|
|
@ -753,10 +1050,10 @@ export default {
|
|||
this.$modal.msgError('退料总量已大于待退料数量!')
|
||||
} else {
|
||||
let arr = []
|
||||
arr = this.codeSelectList.map(item => {
|
||||
arr = this.codeSelectList.map((item) => {
|
||||
return {
|
||||
parentId: this.codeQuery.parentId,
|
||||
typeId: item.modelId,
|
||||
typeId: item.typeId,
|
||||
backNum: 1,
|
||||
backStatus: type,
|
||||
manageType: 0,
|
||||
|
|
@ -768,12 +1065,15 @@ export default {
|
|||
taskId: this.codeQuery.taskId,
|
||||
arr: arr,
|
||||
}
|
||||
// console.log(param)
|
||||
setCodeBack(param).then(response => {
|
||||
|
||||
console.log(param)
|
||||
setCodeBack(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('操作成功')
|
||||
// this.openCode = false;
|
||||
this.returnNum = Number(this.returnNum) - this.codeSelectList.length
|
||||
this.returnNum =
|
||||
Number(this.returnNum) -
|
||||
this.codeSelectList.length
|
||||
this.handleCodeQuery()
|
||||
this.handleQuery()
|
||||
}
|
||||
|
|
@ -781,15 +1081,15 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.clickText {
|
||||
}
|
||||
.clickText {
|
||||
color: #02a7f0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" label="审批意见">
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.reasonRejection || '同意' }}
|
||||
{{ row.reasonRejection }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export const dialogConfig = {
|
|||
innerTitle: '',
|
||||
innerVisible: false,
|
||||
handleColShow: false, // 是否显示操作列
|
||||
pageShow: false, // 是否显示分页组件
|
||||
pageShow: true, // 是否显示分页组件
|
||||
isSelShow: false,// 表格是否需要复选框
|
||||
isFormShow: true, // 是否显示表单查询组件
|
||||
formLabel: [
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@
|
|||
</TableModel>
|
||||
<el-row
|
||||
class="dialog-common-btn"
|
||||
style="margin-top: 20px"
|
||||
v-if="dialogConfig.outerTitle == '审核'"
|
||||
>
|
||||
<el-button size="mini" type="primary" @click="auditingPass"
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@ export const dialogConfig = {
|
|||
isSelShow: false,// 表格是否需要复选框
|
||||
isFormShow: true, // 是否显示表单查询组件
|
||||
formLabel: [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '类型名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '规格型号', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '设备类型', f_model: 'keywords', f_type: 'ipt' },
|
||||
],
|
||||
|
||||
columnsList: [
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<div>
|
||||
<TableModel
|
||||
:config="config"
|
||||
:sendParams="sendParams"
|
||||
@getTableSelectionChange="getTableSelectionChange"
|
||||
>
|
||||
<template slot="export">
|
||||
|
|
@ -13,13 +14,14 @@
|
|||
</el-row>
|
||||
</template>
|
||||
<template slot-scope="{ data }" slot="handle">
|
||||
<el-button
|
||||
v-for="btn in handleBtn"
|
||||
:key="btn.id"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleBtnEvent(data, btn.id)"
|
||||
>{{ btn.btn_title }}</el-button
|
||||
<el-button type="text" size="mini" @click="handlePreview(data)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="handleEdit(data)"
|
||||
>编辑退料</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="handleRevoke(data)"
|
||||
>撤回</el-button
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
|
|
@ -30,8 +32,48 @@
|
|||
@closeDialogInner="closeDialogInner"
|
||||
>
|
||||
<template slot="outerContent">
|
||||
<template v-if="dialogConfig.outerTitle === '查看'">
|
||||
<TableModel :config="dialogConfig" />
|
||||
</template>
|
||||
<template v-if="dialogConfig.outerTitle === '编辑退料'">
|
||||
<TableModel :config="dialogConfig">
|
||||
<template slot="export">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-button type="success" plain size="mini"
|
||||
>批量合格</el-button
|
||||
>
|
||||
<el-button type="warning" plain size="mini"
|
||||
>批量维修</el-button
|
||||
>
|
||||
<el-button type="danger" plain size="mini"
|
||||
>批量预报废</el-button
|
||||
>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ data }" slot="handle">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
style="color: #95d475"
|
||||
>合格</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
style="color: #eebe77"
|
||||
>维修</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
style="color: #f89898"
|
||||
>预报废</el-button
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
</template>
|
||||
</template>
|
||||
</DialogModel>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -41,6 +83,7 @@
|
|||
import DialogModel from '@/components/DialogModel'
|
||||
import SelDepart from '../../component/selDepart.vue'
|
||||
import { config, dialogConfig } from './config'
|
||||
import { receiveView } from '@/api/claimAndRefund/return'
|
||||
export default {
|
||||
name: 'auditingReturn',
|
||||
components: {
|
||||
|
|
@ -48,36 +91,37 @@
|
|||
DialogModel,
|
||||
SelDepart,
|
||||
},
|
||||
props: {
|
||||
sendParams: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
dialogConfig,
|
||||
handleBtn: [
|
||||
{ btn_title: '查看', id: 1 },
|
||||
{ btn_title: '编辑退料', id: 2 },
|
||||
{ btn_title: '撤回', id: 3 },
|
||||
],
|
||||
receiveView,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 按钮操作 */
|
||||
handleBtnEvent(data, id) {
|
||||
switch (id) {
|
||||
case 1:
|
||||
handlePreview(row) {
|
||||
this.dialogConfig.outerTitle = '查看'
|
||||
this.dialogConfig.handleColShow = false
|
||||
this.dialogConfig.outerWidth = '70%'
|
||||
break
|
||||
case 2:
|
||||
this.dialogConfig.outerTitle = '编辑退料'
|
||||
this.dialogConfig.outerWidth = '70%'
|
||||
break
|
||||
case 3:
|
||||
this.dialogConfig.outerTitle = '撤回'
|
||||
|
||||
break
|
||||
}
|
||||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.dialogConfig.outerTitle = '编辑退料'
|
||||
this.dialogConfig.handleColShow = true
|
||||
this.dialogConfig.outerWidth = '70%'
|
||||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
handleRevoke(row) {},
|
||||
|
||||
getTableSelectionChange() {},
|
||||
closeDialog(val) {
|
||||
this.dialogConfig.outerVisible = val
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
<span>驳回退料</span>
|
||||
<el-button type="text" @click="handleBack">返回</el-button>
|
||||
</el-row>
|
||||
<AuditingReturn />
|
||||
<AuditingReturn :sendParams="sendParamsAuditing" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -173,6 +173,7 @@
|
|||
deptIds: [],
|
||||
},
|
||||
auditingList: [],
|
||||
sendParamsAuditing: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -200,12 +201,18 @@
|
|||
this.dialogConfig.outerVisible = true
|
||||
},
|
||||
handleReject(row) {
|
||||
this.sendParamsAuditing.taskId = row.taskId
|
||||
this.temp = !this.temp
|
||||
},
|
||||
|
||||
/* 关闭选择审批部门弹框 */
|
||||
async closeDepartSel(val, list) {
|
||||
if (list.length > 1) {
|
||||
console.log(list, '选择的部门---')
|
||||
|
||||
if (list.length < 1) {
|
||||
this.$message.error('请选择审批部门')
|
||||
return
|
||||
}
|
||||
list.map((e) => {
|
||||
this.submitScrapParams.deptIds.push(e.id)
|
||||
})
|
||||
|
|
@ -215,7 +222,6 @@
|
|||
this.dialogConfig.outerVisible = val
|
||||
this.$refs.listingTbRef.getList()
|
||||
}
|
||||
}
|
||||
this.submitScrapParams.deptIds =
|
||||
this.submitScrapParams.taskIdList = []
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue