|
@@ -99,7 +99,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="ReturnTurnover">
|
|
<script setup name="ReturnTurnover">
|
|
-import { getFinishedReturnList, getProcessInspectionList, checkCarriers } from '@/api/business/returnTurnover'
|
|
|
|
|
|
+import { getFinishedReturnList, getProcessInspectionList, checkCarriers, getProcessInspectionLists } from '@/api/business/returnTurnover'
|
|
import { getP2NeedCheckProcess } from '@/api/business/p2'
|
|
import { getP2NeedCheckProcess } from '@/api/business/p2'
|
|
import dialogReturnTurnover from './DialogReturnTurnover.vue';
|
|
import dialogReturnTurnover from './DialogReturnTurnover.vue';
|
|
import DialogReturnTurnoverBatch from './DialogReturnTurnoverBatch.vue';
|
|
import DialogReturnTurnoverBatch from './DialogReturnTurnoverBatch.vue';
|
|
@@ -170,7 +170,7 @@ function handleShowTurnoverDialog(row) {
|
|
console.log(row)
|
|
console.log(row)
|
|
//proxy.$refs.dialogReturnTurnoverRef.open(row)
|
|
//proxy.$refs.dialogReturnTurnoverRef.open(row)
|
|
//判断该批次的工序是否需要审核
|
|
//判断该批次的工序是否需要审核
|
|
- /*
|
|
|
|
|
|
+ // /*
|
|
getP2NeedCheckProcess("Y").then(res => {
|
|
getP2NeedCheckProcess("Y").then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
//需要序检的工序
|
|
//需要序检的工序
|
|
@@ -205,7 +205,7 @@ function handleShowTurnoverDialog(row) {
|
|
})
|
|
})
|
|
// */
|
|
// */
|
|
|
|
|
|
- proxy.$refs.dialogReturnTurnoverRef.open(row)
|
|
|
|
|
|
+ // proxy.$refs.dialogReturnTurnoverRef.open(row)
|
|
}
|
|
}
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
@@ -253,25 +253,30 @@ async function handleBatchTurnover() {
|
|
proxy.$modal.msgError('请不要选择外协箱外协单进行批量周转')
|
|
proxy.$modal.msgError('请不要选择外协箱外协单进行批量周转')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- /*
|
|
|
|
|
|
+ // /*
|
|
getP2NeedCheckProcess("Y").then(res => {
|
|
getP2NeedCheckProcess("Y").then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
//需要序检的工序
|
|
//需要序检的工序
|
|
var process = []
|
|
var process = []
|
|
let needCheckProcessCodeList = res.rows.map(item => item.prcode.trim())
|
|
let needCheckProcessCodeList = res.rows.map(item => item.prcode.trim())
|
|
- let returnReceiptProcessCodeList = row.finishedProcesses.map(v => ({ processCode: v.processCode, processStepNumber: v.processStepNumber, returnReceiptDetailId: v.returnReceiptDetailId }))
|
|
|
|
- for (let i = 0; i < needCheckProcessCodeList.length; i++) {
|
|
|
|
- for (let j = 0; j < returnReceiptProcessCodeList.length; j++) {
|
|
|
|
- if (needCheckProcessCodeList[i] == returnReceiptProcessCodeList[j].processCode) {
|
|
|
|
- process.push(returnReceiptProcessCodeList[j])
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ let returnReceiptProcessCodeList = []
|
|
|
|
+ selections.value.forEach(e => {
|
|
|
|
+ let itemReturnCodes = e.finishedProcesses.map({ processCode: v.processCode, processStepNumber: v.processStepNumber, returnReceiptDetailId: v.returnReceiptDetailId })
|
|
|
|
+ returnReceiptProcessCodeList.push(itemReturnCodes.reverse().find(e => needCheckProcessCodeList.some(t => t === e.processCode)))
|
|
|
|
+ })
|
|
|
|
+ // let returnReceiptProcessCodeList = row.finishedProcesses.map(v => ({ processCode: v.processCode, processStepNumber: v.processStepNumber, returnReceiptDetailId: v.returnReceiptDetailId }))
|
|
|
|
+ // for (let i = 0; i < needCheckProcessCodeList.length; i++) {
|
|
|
|
+ // for (let j = 0; j < returnReceiptProcessCodeList.length; j++) {
|
|
|
|
+ // if (needCheckProcessCodeList[i] == returnReceiptProcessCodeList[j].processCode) {
|
|
|
|
+ // process.push(returnReceiptProcessCodeList[j])
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
console.log(needCheckProcessCodeList)
|
|
console.log(needCheckProcessCodeList)
|
|
console.log(returnReceiptProcessCodeList)
|
|
console.log(returnReceiptProcessCodeList)
|
|
console.log(process)
|
|
console.log(process)
|
|
if (process.length > 0) {
|
|
if (process.length > 0) {
|
|
- getProcessInspectionList(process[process.length - 1]).then(res => {
|
|
|
|
|
|
+ getProcessInspectionLists(returnReceiptProcessCodeList).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
if (res.data) {
|
|
if (res.data) {
|
|
proxy.$refs.dialogReturnTurnoverRef.openBatch(selections.value)
|
|
proxy.$refs.dialogReturnTurnoverRef.openBatch(selections.value)
|
|
@@ -288,7 +293,7 @@ async function handleBatchTurnover() {
|
|
})
|
|
})
|
|
// */
|
|
// */
|
|
|
|
|
|
- proxy.$refs.dialogReturnTurnoverBatchRef.openBatch(selections.value)
|
|
|
|
|
|
+ // proxy.$refs.dialogReturnTurnoverBatchRef.openBatch(selections.value)
|
|
}
|
|
}
|
|
|
|
|
|
getList();
|
|
getList();
|