优化流程

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

@ -119,69 +119,57 @@
prop="typeName" prop="typeName"
:show-overflow-tooltip="true" :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-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 <el-table-column
label="规格型号" label="规格型号"
align="center" align="center"
prop="typeCode" prop="typeModelName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="申请数量" label="单位"
align="center" align="center"
prop="preNum" prop="unitName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
label="退料数量" label="预领数量"
align="center" align="center"
prop="num" prop="partNum"
:show-overflow-tooltip="true" :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
label="申请数量"
align="center"
prop="preNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料数量"
align="center"
:show-overflow-tooltip="true"
>
<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 <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -404,99 +392,7 @@
width="1200px" width="1200px"
append-to-body append-to-body
> >
<div v-if="dialogData.typeMange == 1"> <div v-if="dialogData.typeMange == 2">
<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 style="margin-bottom: 30px"> <div style="margin-bottom: 30px">
接收抱杆类型{{ dialogData.typeName }}型号{{ 接收抱杆类型{{ dialogData.typeName }}型号{{
dialogData.typeCode dialogData.typeCode
@ -596,6 +492,99 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </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> </el-dialog>
</div> </div>
</template> </template>
@ -605,6 +594,7 @@ import {
receiveView, receiveView,
getBackMachine, getBackMachine,
backReceiveRecordWeb, backReceiveRecordWeb,
backReceiveRecordWebPt,
setNumBack, setNumBack,
setCodeBack, setCodeBack,
getRecord, getRecord,
@ -661,6 +651,7 @@ export default {
unitId: undefined, unitId: undefined,
modelId: undefined, modelId: undefined,
typeId: undefined, typeId: undefined,
agreementId: '',
}, },
openCode: false, // openCode: false, //
openNum: false, // openNum: false, //
@ -740,6 +731,22 @@ export default {
receiveView(this.queryParams) receiveView(this.queryParams)
.then((response) => { .then((response) => {
this.deviceList = response.data.rows 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.total = response.data.total
this.loading = false this.loading = false
}) })
@ -790,31 +797,34 @@ export default {
} }
backReceiveRecordWeb(param).then((res) => { backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.title = '查看' this.title = '查看1'
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') { item.qualifiedNum = item.hgNum
item.qualifiedNum = item.backNum item.serviceNum = item.wxNum
item.serviceNum = 0 item.scrapNum = item.bfNum
item.scrapNum = 0 // if (item.backStatus == '1') {
} // item.qualifiedNum = item.backNum
if (item.backStatus == '2') { // item.serviceNum = 0
item.serviceNum = item.backNum // item.scrapNum = 0
item.qualifiedNum = 0 // }
item.scrapNum = 0 // if (item.backStatus == '2') {
} // item.serviceNum = item.backNum
if (item.backStatus == '3') { // item.qualifiedNum = 0
item.scrapNum = item.backNum // item.scrapNum = 0
item.qualifiedNum = 0 // }
item.serviceNum = 0 // if (item.backStatus == '3') {
} // item.scrapNum = item.backNum
// item.qualifiedNum = 0
// item.serviceNum = 0
// }
}) })
} }
}) })
} else if (row.manageType == '0') { } else if (row.manageType == '0') {
this.title = '查看' this.title = '查看0'
this.openCode = true this.openCode = true
this.resetForm('codeQuery') this.resetForm('codeQuery')
this.codeQuery.parentId = row.id this.codeQuery.parentId = row.id
@ -830,6 +840,7 @@ export default {
let param = { let param = {
parentId: row.id, parentId: row.id,
typeId: modelIdsJoined, typeId: modelIdsJoined,
agreementId: row.agreementId,
} }
backReceiveRecordWeb(param).then((res) => { backReceiveRecordWeb(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -841,19 +852,18 @@ export default {
(itemB) => itemA.modelId === itemB.modelId, (itemB) => itemA.modelId === itemB.modelId,
) )
if (matchingItemB) { if (matchingItemB) {
switch (matchingItemB.backStatus) { // switch (matchingItemB.backStatus) {
case '1': // case '1':
itemA.qualifiedNum = itemA.qualifiedNum = matchingItemB.hgNum
matchingItemB.backNum // break
break // case '2':
case '2': itemA.serviceNum = matchingItemB.wxNum
itemA.serviceNum = matchingItemB.backNum // break
break // case '3':
case '3': itemA.scrapNum = matchingItemB.bfNum
itemA.scrapNum = matchingItemB.backNum // break
break // default:
default: // }
}
} }
}) })
} }
@ -868,6 +878,7 @@ export default {
this.codeQuery.parentId = row.id this.codeQuery.parentId = row.id
this.codeQuery.taskId = row.taskId this.codeQuery.taskId = row.taskId
this.codeQuery.typeId = row.modelId this.codeQuery.typeId = row.modelId
this.codeQuery.agreementId = row.agreementId
this.dialogIsView = false this.dialogIsView = false
this.returnNum = Number(row.num) this.returnNum = Number(row.num)
this.handleCodeQuery() this.handleCodeQuery()
@ -902,6 +913,12 @@ export default {
manageType: row.manageType, manageType: row.manageType,
createBy: this.createBy, 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) => { revoke(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
@ -932,9 +949,9 @@ export default {
}, },
//退 //退
getCodeViewList() { getCodeViewList() {
backReceiveRecordWeb(this.codeQuery).then((response) => { backReceiveRecordWebPt(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') {
@ -1076,7 +1093,6 @@ export default {
taskId: this.codeQuery.taskId, taskId: this.codeQuery.taskId,
arr: arr, arr: arr,
} }
console.log(param) console.log(param)
setCodeBack(param).then((response) => { setCodeBack(param).then((response) => {
if (response.code == 200) { if (response.code == 200) {
@ -1098,6 +1114,7 @@ export default {
width: 60px !important; width: 60px !important;
margin-bottom: 10px; margin-bottom: 10px;
} }
.clickText { .clickText {
color: #02a7f0; color: #02a7f0;
cursor: pointer; cursor: pointer;