优化流程

This commit is contained in:
BianLzhaoMin 2024-05-08 17:43:00 +08:00
parent 360f2fc5cc
commit f31c01c045
1 changed files with 189 additions and 172 deletions

View File

@ -101,25 +101,6 @@
:show-overflow-tooltip="true"
/>
<el-table-column type="expand" v-if="isPlural">
<template slot-scope="scope">
<div class="nested-table-container">
<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 type="expand" v-if="isView">
<template slot-scope="scope">
<div class="nested-table-container">
<el-table
@ -175,11 +156,18 @@
<el-table-column
label="退料数量"
align="center"
prop="num"
:show-overflow-tooltip="true"
/>
</el-table>
</div>
>
<template slot-scope="scope">
<span>
{{
(scope.row.partNum =
scope.row.manageType == 0 ||
scope.row.manageType == 1
? scope.row.num
: scope.row.partNum)
}}
</span>
</template>
</el-table-column>
<el-table-column
@ -404,99 +392,7 @@
width="1200px"
append-to-body
>
<div v-if="dialogData.typeMange == 1">
<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>
</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"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.qualifiedNum"
placeholder="请输入合格数量"
type="number"
:min="0"
clearable
:disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column
label="待维修数量"
align="center"
prop="serviceNum"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.serviceNum"
placeholder="请输入待维修数量"
type="number"
:min="0"
clearable
:disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column
label="待报废数量"
align="center"
prop="scrapNum"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.scrapNum"
placeholder="请输入待报废数量"
type="number"
:min="0"
clearable
:disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<!-- <el-table-column label="报废信息" align="center" prop="" :show-overflow-tooltip="true" /> -->
</el-table>
</div>
<div v-else>
<div v-if="dialogData.typeMange == 2">
<div style="margin-bottom: 30px">
接收抱杆类型{{ dialogData.typeName }}型号{{
dialogData.typeCode
@ -596,6 +492,99 @@
</el-table-column>
</el-table>
</div>
<div v-else>
<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>
</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"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.qualifiedNum"
placeholder="请输入合格数量"
type="number"
:min="0"
clearable
:disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column
label="待维修数量"
align="center"
prop="serviceNum"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.serviceNum"
placeholder="请输入待维修数量"
type="number"
:min="0"
clearable
:disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column
label="待报废数量"
align="center"
prop="scrapNum"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.scrapNum"
placeholder="请输入待报废数量"
type="number"
:min="0"
clearable
:disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<!-- <el-table-column label="报废信息" align="center" prop="" :show-overflow-tooltip="true" /> -->
</el-table>
</div>
</el-dialog>
</div>
</template>
@ -605,6 +594,7 @@ import {
receiveView,
getBackMachine,
backReceiveRecordWeb,
backReceiveRecordWebPt,
setNumBack,
setCodeBack,
getRecord,
@ -661,6 +651,7 @@ export default {
unitId: undefined,
modelId: undefined,
typeId: undefined,
agreementId: '',
},
openCode: false, //
openNum: false, //
@ -740,6 +731,22 @@ export default {
receiveView(this.queryParams)
.then((response) => {
this.deviceList = response.data.rows
console.log(this.deviceList, ' this.deviceList')
// this.deviceList.forEach(item => {
// console.log(item.num, 'item.num')
// if (item.manageType == '0' || item.manageType == '1') {
// item.partNum = item.num
// } else {
// item.partNum = item.partNum
// }
// if (item.maTypeDetails.length > 0) {
// this.isPlural = true
// }
// })
console.log(this.deviceList, 'deviceList')
this.total = response.data.total
this.loading = false
})
@ -790,31 +797,34 @@ export default {
}
backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) {
this.title = '查看'
this.title = '查看1'
this.openNum = true
this.dialogIsView = true
this.numList = res.data.rows
this.numList.forEach((item) => {
if (item.backStatus == '1') {
item.qualifiedNum = item.backNum
item.serviceNum = 0
item.scrapNum = 0
}
if (item.backStatus == '2') {
item.serviceNum = item.backNum
item.qualifiedNum = 0
item.scrapNum = 0
}
if (item.backStatus == '3') {
item.scrapNum = item.backNum
item.qualifiedNum = 0
item.serviceNum = 0
}
item.qualifiedNum = item.hgNum
item.serviceNum = item.wxNum
item.scrapNum = item.bfNum
// if (item.backStatus == '1') {
// item.qualifiedNum = item.backNum
// item.serviceNum = 0
// item.scrapNum = 0
// }
// if (item.backStatus == '2') {
// item.serviceNum = item.backNum
// item.qualifiedNum = 0
// item.scrapNum = 0
// }
// if (item.backStatus == '3') {
// item.scrapNum = item.backNum
// item.qualifiedNum = 0
// item.serviceNum = 0
// }
})
}
})
} else if (row.manageType == '0') {
this.title = '查看'
this.title = '查看0'
this.openCode = true
this.resetForm('codeQuery')
this.codeQuery.parentId = row.id
@ -830,6 +840,7 @@ export default {
let param = {
parentId: row.id,
typeId: modelIdsJoined,
agreementId: row.agreementId,
}
backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) {
@ -841,19 +852,18 @@ export default {
(itemB) => itemA.modelId === itemB.modelId,
)
if (matchingItemB) {
switch (matchingItemB.backStatus) {
case '1':
itemA.qualifiedNum =
matchingItemB.backNum
break
case '2':
itemA.serviceNum = matchingItemB.backNum
break
case '3':
itemA.scrapNum = matchingItemB.backNum
break
default:
}
// switch (matchingItemB.backStatus) {
// case '1':
itemA.qualifiedNum = matchingItemB.hgNum
// break
// case '2':
itemA.serviceNum = matchingItemB.wxNum
// break
// case '3':
itemA.scrapNum = matchingItemB.bfNum
// break
// default:
// }
}
})
}
@ -868,6 +878,7 @@ export default {
this.codeQuery.parentId = row.id
this.codeQuery.taskId = row.taskId
this.codeQuery.typeId = row.modelId
this.codeQuery.agreementId = row.agreementId
this.dialogIsView = false
this.returnNum = Number(row.num)
this.handleCodeQuery()
@ -902,6 +913,12 @@ export default {
manageType: row.manageType,
createBy: this.createBy,
}
if (row.maTypeDetails && row.maTypeDetails.length > 0) {
param.typeIds = row.maTypeDetails.map((item) => {
return item.modelId
})
}
console.log(param)
revoke(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess('操作成功')
@ -932,9 +949,9 @@ export default {
},
//退
getCodeViewList() {
backReceiveRecordWeb(this.codeQuery).then((response) => {
backReceiveRecordWebPt(this.codeQuery).then((response) => {
this.codeList = response.data.rows
this.codeList
// this.codeList
this.codeList.forEach((item) => {
item.typeModelName = item.typeCode
if (item.backStatus == '1') {
@ -1076,7 +1093,6 @@ export default {
taskId: this.codeQuery.taskId,
arr: arr,
}
console.log(param)
setCodeBack(param).then((response) => {
if (response.code == 200) {
@ -1098,6 +1114,7 @@ export default {
width: 60px !important;
margin-bottom: 10px;
}
.clickText {
color: #02a7f0;
cursor: pointer;