由阿胡

This commit is contained in:
BianLzhaoMin 2024-04-28 16:55:12 +08:00
parent 8e964622fb
commit 83863f7e22
8 changed files with 1155 additions and 806 deletions

View File

@ -132,7 +132,7 @@
data() { data() {
return { return {
total: 0, total: 0,
tableList: [], tableList: [{ demo: 123 }],
/* 分页参数 */ /* 分页参数 */
pageParams: { pageParams: {
pageNum: 1, pageNum: 1,

View File

@ -1,6 +1,13 @@
<template> <template>
<div class="app-container" id="returnInDetail"> <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-form-item label="关键字" prop="keyword">
<el-input <el-input
v-model="queryParams.keyword" v-model="queryParams.keyword"
@ -12,7 +19,13 @@
</el-form-item>--> </el-form-item>-->
<el-form-item label="类型名称" prop="typeId"> <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 <el-option
v-for="typeItem in typeList" v-for="typeItem in typeList"
:key="typeItem.typeId" :key="typeItem.typeId"
@ -36,53 +49,131 @@
</el-form-item> </el-form-item>
<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>
<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-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <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>
<el-col :span="1.5" v-if="!isView"> <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-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="deviceList"> <el-table v-loading="loading" :data="deviceList">
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <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"> <template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span> <span>{{
(queryParams.pageNum - 1) * 10 + scope.$index + 1
}}</span>
</template> </template>
</el-table-column> </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"> <el-table-column type="expand" v-if="isView">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="nested-table-container"> <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
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" /> label="序号"
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" /> type="index"
<el-table-column label="预领数量" align="center" prop="partNum" :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> </el-table>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="申请数量" align="center" prop="preNum" :show-overflow-tooltip="true" /> label="规格型号"
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300"> 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"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@click="handleViewCode(scope.row)" @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> </el-button>
@ -95,7 +186,11 @@
size="mini" size="mini"
type="primary" type="primary"
@click="handleCodeReturn(scope.row)" @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> </el-button>
@ -103,7 +198,12 @@
size="mini" size="mini"
type="primary" type="primary"
@click="handleNumReturn(scope.row)" @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> </el-button>
@ -128,40 +228,114 @@
/> />
<!-- 编码退料弹窗 --> <!-- 编码退料弹窗 -->
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body> <el-dialog
<div style="margin-left: 40px; margin-bottom: 10px">退料数量{{ returnNum }}</div> :title="title"
<el-form :model="codeQuery" ref="codeQuery" size="small" :inline="true" label-width="100px"> :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-form-item label="设备编码" prop="maCode">
<el-input v-model="codeQuery.maCode" maxlength="20" /> <el-input v-model="codeQuery.maCode" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleCodeQuery">查询</el-button> <el-button
<el-button icon="el-icon-refresh" size="mini" @click="resetCodeQuery">重置</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-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView"> <el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5"> <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>
<el-col :span="1.5"> <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>
<el-col :span="1.5"> <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-col>
</el-row> </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 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"> <template scope="scope">
<span>{{ (codeQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span> <span>{{
(codeQuery.pageNum - 1) * 10 + scope.$index + 1
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" /> label="设备类型"
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="状态" align="center" prop="maStatus" :show-overflow-tooltip="true" /> 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 <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -170,9 +344,24 @@
width="250" width="250"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="success" @click="saveCodeBack(scope.row, 1)">合格</el-button> <el-button
<el-button size="mini" type="primary" @click="saveCodeBack(scope.row, 2)">待维修</el-button> size="mini"
<el-button size="mini" type="warning" @click="saveCodeBack(scope.row, 3)">预报废</el-button> 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -186,22 +375,54 @@
</el-dialog> </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 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-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5"> <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-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="numList" height="500"> <el-table v-loading="loading" :data="numList" height="500">
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" /> label="类型名称"
<el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true"> 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"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.qualifiedNum" v-model.number="scope.row.qualifiedNum"
@ -214,7 +435,12 @@
/> />
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.serviceNum" v-model.number="scope.row.serviceNum"
@ -227,7 +453,11 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待报废数量" align="center" prop="scrapNum"> <el-table-column
label="待报废数量"
align="center"
prop="scrapNum"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.scrapNum" v-model.number="scope.row.scrapNum"
@ -245,11 +475,18 @@
</div> </div>
<div v-else> <div v-else>
<div style="margin-bottom: 30px"> <div style="margin-bottom: 30px">
接收抱杆类型{{ dialogData.typeName }}型号{{ dialogData.typeCode }}付数{{ returnNum }}接收明细如下 接收抱杆类型{{ dialogData.typeName }}型号{{
dialogData.typeCode
}}付数{{ returnNum }}接收明细如下
</div> </div>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView"> <el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5"> <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-button>
</el-col> </el-col>
@ -257,11 +494,36 @@
<el-table :data="dialogData.maTypeDetails" style="width: 100%"> <el-table :data="dialogData.maTypeDetails" style="width: 100%">
<!-- 子表格的列 --> <!-- 子表格的列 -->
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" /> <el-table-column
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" /> label="设备类型"
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" /> align="center"
<el-table-column label="应退数量" align="center" prop="partNum" :show-overflow-tooltip="true" /> prop="typeName"
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true"> :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"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.qualifiedNum" v-model.number="scope.row.qualifiedNum"
@ -274,7 +536,12 @@
/> />
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.serviceNum" v-model.number="scope.row.serviceNum"
@ -287,7 +554,11 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待报废数量" align="center" prop="scrapNum"> <el-table-column
label="待报废数量"
align="center"
prop="scrapNum"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model.number="scope.row.scrapNum" v-model.number="scope.row.scrapNum"
@ -399,32 +670,48 @@ export default {
this.getList() this.getList()
getInfo().then(res => { getInfo().then((res) => {
this.createBy = res.user.userId this.createBy = res.user.userId
}) })
}, },
methods: { methods: {
// //
getTypeList() { getTypeList() {
getTypeList({ level: '3' }).then(response => { getTypeList({ level: '3' }).then((response) => {
this.typeList = response.data this.typeList = response.data
}) })
}, },
// //
equipmentType() { equipmentType() {
equipmentTypeTree().then(response => { equipmentTypeTree().then((response) => {
this.equipmentTypeList = response.data this.equipmentTypeList = response.data
this.equipmentTypeList.forEach((item, index) => { this.equipmentTypeList.forEach((item, index) => {
if (item.children && item.children.length > 0) { if (item.children && item.children.length > 0) {
item.children.forEach((item2, index2) => { item.children.forEach((item2, index2) => {
if (item2.children && item2.children.length > 0) { if (
item2.children.forEach(item3 => { item2.children &&
if (item3.children && item3.children.length > 0) { item2.children.length > 0
item3.children.forEach(item4 => { ) {
item4.machineTypeName = item3.typeName item2.children.forEach((item3) => {
item4.specificationType = item4.typeName if (
this.$set(item4, 'purchasePrice', 0) item3.children &&
this.$set(item4, 'purchaseNum', 1) 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() { getList() {
this.loading = true this.loading = true
receiveView(this.queryParams) receiveView(this.queryParams)
.then(response => { .then((response) => {
this.deviceList = response.data.rows this.deviceList = response.data.rows
this.total = response.data.total this.total = response.data.total
this.loading = false this.loading = false
@ -473,7 +760,7 @@ export default {
parentId: this.queryParams.id, parentId: this.queryParams.id,
taskId: this.queryParams.taskId, taskId: this.queryParams.taskId,
} }
endBack(param).then(response => { endBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
this.back() this.back()
@ -488,13 +775,13 @@ export default {
parentId: row.id, parentId: row.id,
typeId: row.modelId, typeId: row.modelId,
} }
backReceiveRecordWeb(param).then(res => { backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.title = '查看' this.title = '查看'
this.openNum = true this.openNum = true
this.dialogIsView = true this.dialogIsView = true
this.numList = res.data.rows this.numList = res.data.rows
this.numList.forEach(item => { this.numList.forEach((item) => {
if (item.backStatus == '1') { if (item.backStatus == '1') {
item.qualifiedNum = item.backNum item.qualifiedNum = item.backNum
item.serviceNum = 0 item.serviceNum = 0
@ -524,28 +811,35 @@ export default {
this.handleCodeQuery() this.handleCodeQuery()
} else if (row.manageType == '2') { } else if (row.manageType == '2') {
this.handleNumReturn(row) this.handleNumReturn(row)
const modelIdsJoined = row.maTypeDetails.map(item => item.modelId).join(',') const modelIdsJoined = row.maTypeDetails
.map((item) => item.modelId)
.join(',')
let param = { let param = {
parentId: row.id, parentId: row.id,
typeId: modelIdsJoined, typeId: modelIdsJoined,
} }
backReceiveRecordWeb(param).then(res => { backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.title = '查看' this.title = '查看'
this.openNum = true this.openNum = true
this.dialogIsView = true this.dialogIsView = true
this.dialogData.maTypeDetails.map(itemA => { this.dialogData.maTypeDetails.map((itemA) => {
const matchingItemB = res.data.rows.find(itemB => itemA.modelId === itemB.modelId) const matchingItemB = res.data.rows.find(
(itemB) => itemA.modelId === itemB.modelId,
)
if (matchingItemB) { if (matchingItemB) {
switch (matchingItemB.backStatus) { switch (matchingItemB.backStatus) {
case '1': case '1':
itemA.qualifiedNum = matchingItemB.backNum itemA.qualifiedNum =
matchingItemB.backNum
break break
case '2': case '2':
itemA.serviceNum = matchingItemB.backNum itemA.serviceNum =
matchingItemB.backNum
break break
case '3': case '3':
itemA.scrapNum = matchingItemB.backNum itemA.scrapNum =
matchingItemB.backNum
break break
default: default:
} }
@ -578,7 +872,7 @@ export default {
this.dialogData.typeName = row.typeName this.dialogData.typeName = row.typeName
this.dialogData.typeCode = row.typeCode this.dialogData.typeCode = row.typeCode
if (row.maTypeDetails) { if (row.maTypeDetails) {
row.maTypeDetails.forEach(item => { row.maTypeDetails.forEach((item) => {
this.$set(item, 'qualifiedNum', undefined) this.$set(item, 'qualifiedNum', undefined)
this.$set(item, 'serviceNum', undefined) this.$set(item, 'serviceNum', undefined)
this.$set(item, 'scrapNum', undefined) this.$set(item, 'scrapNum', undefined)
@ -597,7 +891,7 @@ export default {
manageType: row.manageType, manageType: row.manageType,
createBy: this.createBy, createBy: this.createBy,
} }
revoke(param).then(response => { revoke(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
this.handleQuery() this.handleQuery()
@ -620,17 +914,17 @@ export default {
}, },
//退 //退
getCodeList() { getCodeList() {
getBackMachine(this.codeQuery).then(response => { getBackMachine(this.codeQuery).then((response) => {
this.codeList = response.data.rows this.codeList = response.data.rows
this.codeTotal = response.data.total this.codeTotal = response.data.total
}) })
}, },
//退 //退
getCodeViewList() { getCodeViewList() {
backReceiveRecordWeb(this.codeQuery).then(response => { backReceiveRecordWeb(this.codeQuery).then((response) => {
this.codeList = response.data.rows this.codeList = response.data.rows
this.codeList this.codeList
this.codeList.forEach(item => { this.codeList.forEach((item) => {
item.typeModelName = item.typeCode item.typeModelName = item.typeCode
if (item.backStatus == '1') { if (item.backStatus == '1') {
item.maStatus = '合格' item.maStatus = '合格'
@ -658,7 +952,10 @@ export default {
} }
let arr = [] let arr = []
for (const item of data) { 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) { if (sumUnmber > item.partNum && sumUnmber > item.num) {
this.$modal.msgError('退料总量已大于待退料数量!') this.$modal.msgError('退料总量已大于待退料数量!')
return return
@ -702,7 +999,7 @@ export default {
taskId: taskId, taskId: taskId,
arr: arr, arr: arr,
} }
setNumBack(param).then(response => { setNumBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
this.openNum = false this.openNum = false
@ -730,7 +1027,7 @@ export default {
taskId: this.codeQuery.taskId, taskId: this.codeQuery.taskId,
arr: arr, arr: arr,
} }
setCodeBack(param).then(response => { setCodeBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
// this.openCode = false; // this.openCode = false;
@ -753,10 +1050,10 @@ export default {
this.$modal.msgError('退料总量已大于待退料数量!') this.$modal.msgError('退料总量已大于待退料数量!')
} else { } else {
let arr = [] let arr = []
arr = this.codeSelectList.map(item => { arr = this.codeSelectList.map((item) => {
return { return {
parentId: this.codeQuery.parentId, parentId: this.codeQuery.parentId,
typeId: item.modelId, typeId: item.typeId,
backNum: 1, backNum: 1,
backStatus: type, backStatus: type,
manageType: 0, manageType: 0,
@ -768,12 +1065,15 @@ export default {
taskId: this.codeQuery.taskId, taskId: this.codeQuery.taskId,
arr: arr, arr: arr,
} }
// console.log(param)
setCodeBack(param).then(response => { console.log(param)
setCodeBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
// this.openCode = false; // this.openCode = false;
this.returnNum = Number(this.returnNum) - this.codeSelectList.length this.returnNum =
Number(this.returnNum) -
this.codeSelectList.length
this.handleCodeQuery() this.handleCodeQuery()
this.handleQuery() this.handleQuery()
} }

View File

@ -20,7 +20,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="审批意见"> <el-table-column align="center" label="审批意见">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.reasonRejection || '同意' }} {{ row.reasonRejection }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -64,7 +64,7 @@ export const dialogConfig = {
innerTitle: '', innerTitle: '',
innerVisible: false, innerVisible: false,
handleColShow: false, // 是否显示操作列 handleColShow: false, // 是否显示操作列
pageShow: false, // 是否显示分页组件 pageShow: true, // 是否显示分页组件
isSelShow: false,// 表格是否需要复选框 isSelShow: false,// 表格是否需要复选框
isFormShow: true, // 是否显示表单查询组件 isFormShow: true, // 是否显示表单查询组件
formLabel: [ formLabel: [

View File

@ -114,6 +114,7 @@
</TableModel> </TableModel>
<el-row <el-row
class="dialog-common-btn" class="dialog-common-btn"
style="margin-top: 20px"
v-if="dialogConfig.outerTitle == '审核'" v-if="dialogConfig.outerTitle == '审核'"
> >
<el-button size="mini" type="primary" @click="auditingPass" <el-button size="mini" type="primary" @click="auditingPass"

View File

@ -40,9 +40,7 @@ export const dialogConfig = {
isSelShow: false,// 表格是否需要复选框 isSelShow: false,// 表格是否需要复选框
isFormShow: true, // 是否显示表单查询组件 isFormShow: true, // 是否显示表单查询组件
formLabel: [ formLabel: [
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' }, { 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: [] },
], ],
columnsList: [ columnsList: [

View File

@ -3,6 +3,7 @@
<div> <div>
<TableModel <TableModel
:config="config" :config="config"
:sendParams="sendParams"
@getTableSelectionChange="getTableSelectionChange" @getTableSelectionChange="getTableSelectionChange"
> >
<template slot="export"> <template slot="export">
@ -13,13 +14,14 @@
</el-row> </el-row>
</template> </template>
<template slot-scope="{ data }" slot="handle"> <template slot-scope="{ data }" slot="handle">
<el-button <el-button type="text" size="mini" @click="handlePreview(data)"
v-for="btn in handleBtn" >查看</el-button
:key="btn.id" >
type="text" <el-button type="text" size="mini" @click="handleEdit(data)"
size="mini" >编辑退料</el-button
@click="handleBtnEvent(data, btn.id)" >
>{{ btn.btn_title }}</el-button <el-button type="text" size="mini" @click="handleRevoke(data)"
>撤回</el-button
> >
</template> </template>
</TableModel> </TableModel>
@ -30,8 +32,48 @@
@closeDialogInner="closeDialogInner" @closeDialogInner="closeDialogInner"
> >
<template slot="outerContent"> <template slot="outerContent">
<template v-if="dialogConfig.outerTitle === '查看'">
<TableModel :config="dialogConfig" /> <TableModel :config="dialogConfig" />
</template> </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> </DialogModel>
</div> </div>
</template> </template>
@ -41,6 +83,7 @@
import DialogModel from '@/components/DialogModel' import DialogModel from '@/components/DialogModel'
import SelDepart from '../../component/selDepart.vue' import SelDepart from '../../component/selDepart.vue'
import { config, dialogConfig } from './config' import { config, dialogConfig } from './config'
import { receiveView } from '@/api/claimAndRefund/return'
export default { export default {
name: 'auditingReturn', name: 'auditingReturn',
components: { components: {
@ -48,36 +91,37 @@
DialogModel, DialogModel,
SelDepart, SelDepart,
}, },
props: {
sendParams: {
type: Object,
default: () => {
return {}
},
},
},
data() { data() {
return { return {
config, config,
dialogConfig, dialogConfig,
handleBtn: [ receiveView,
{ btn_title: '查看', id: 1 },
{ btn_title: '编辑退料', id: 2 },
{ btn_title: '撤回', id: 3 },
],
} }
}, },
methods: { methods: {
/* 按钮操作 */ /* 按钮操作 */
handleBtnEvent(data, id) { handlePreview(row) {
switch (id) {
case 1:
this.dialogConfig.outerTitle = '查看' this.dialogConfig.outerTitle = '查看'
this.dialogConfig.handleColShow = false
this.dialogConfig.outerWidth = '70%' 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 this.dialogConfig.outerVisible = true
}, },
handleEdit(row) {
this.dialogConfig.outerTitle = '编辑退料'
this.dialogConfig.handleColShow = true
this.dialogConfig.outerWidth = '70%'
this.dialogConfig.outerVisible = true
},
handleRevoke(row) {},
getTableSelectionChange() {}, getTableSelectionChange() {},
closeDialog(val) { closeDialog(val) {
this.dialogConfig.outerVisible = val this.dialogConfig.outerVisible = val

View File

@ -129,7 +129,7 @@
<span>驳回退料</span> <span>驳回退料</span>
<el-button type="text" @click="handleBack">返回</el-button> <el-button type="text" @click="handleBack">返回</el-button>
</el-row> </el-row>
<AuditingReturn /> <AuditingReturn :sendParams="sendParamsAuditing" />
</template> </template>
</div> </div>
</template> </template>
@ -173,6 +173,7 @@
deptIds: [], deptIds: [],
}, },
auditingList: [], auditingList: [],
sendParamsAuditing: {},
} }
}, },
created() { created() {
@ -200,12 +201,18 @@
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
}, },
handleReject(row) { handleReject(row) {
this.sendParamsAuditing.taskId = row.taskId
this.temp = !this.temp this.temp = !this.temp
}, },
/* 关闭选择审批部门弹框 */ /* 关闭选择审批部门弹框 */
async closeDepartSel(val, list) { async closeDepartSel(val, list) {
if (list.length > 1) { console.log(list, '选择的部门---')
if (list.length < 1) {
this.$message.error('请选择审批部门')
return
}
list.map((e) => { list.map((e) => {
this.submitScrapParams.deptIds.push(e.id) this.submitScrapParams.deptIds.push(e.id)
}) })
@ -215,7 +222,6 @@
this.dialogConfig.outerVisible = val this.dialogConfig.outerVisible = val
this.$refs.listingTbRef.getList() this.$refs.listingTbRef.getList()
} }
}
this.submitScrapParams.deptIds = this.submitScrapParams.deptIds =
this.submitScrapParams.taskIdList = [] this.submitScrapParams.taskIdList = []
}, },