|
@@ -117,14 +117,14 @@
|
|
prop="productNum"
|
|
prop="productNum"
|
|
width="96"
|
|
width="96"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
|
|
+ <!-- <el-table-column
|
|
label="原箱号"
|
|
label="原箱号"
|
|
align="center"
|
|
align="center"
|
|
prop="originalCarrier"
|
|
prop="originalCarrier"
|
|
width="320"
|
|
width="320"
|
|
- />
|
|
|
|
|
|
+ /> -->
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="新箱号"
|
|
|
|
|
|
+ label="箱号"
|
|
align="center"
|
|
align="center"
|
|
prop="newCarrier"
|
|
prop="newCarrier"
|
|
width="320"
|
|
width="320"
|
|
@@ -133,7 +133,7 @@
|
|
label="外协工序"
|
|
label="外协工序"
|
|
align="center"
|
|
align="center"
|
|
prop="processAlias"
|
|
prop="processAlias"
|
|
- width="120"
|
|
|
|
|
|
+ width="200"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="收回数量"
|
|
label="收回数量"
|
|
@@ -149,14 +149,20 @@
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-input-number
|
|
<el-input-number
|
|
|
|
+ v-if=" scope.row.productionDeptId == 0"
|
|
v-model="scope.row.auditNum"
|
|
v-model="scope.row.auditNum"
|
|
:min="0"
|
|
:min="0"
|
|
controls-position="right"
|
|
controls-position="right"
|
|
style="text-align: center"
|
|
style="text-align: center"
|
|
/>
|
|
/>
|
|
|
|
+ <el-input v-model="scope.row.auditNum" v-else readonly />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
<el-table-column label="备注" align="center" prop="remark">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-input v-model.trim="scope.row.remark" v-if="editStatus" />
|
|
|
|
+ <el-input v-model="scope.row.remark" v-else readonly />
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="审核状态"
|
|
label="审核状态"
|
|
@@ -256,6 +262,7 @@ const reset = () => {
|
|
supplierName: "",
|
|
supplierName: "",
|
|
remark: "",
|
|
remark: "",
|
|
details: [],
|
|
details: [],
|
|
|
|
+ detailInfo:[]
|
|
};
|
|
};
|
|
proxy.resetForm("formRef");
|
|
proxy.resetForm("formRef");
|
|
};
|
|
};
|
|
@@ -315,12 +322,30 @@ const handleMultipleSelectedOutsourceDetails = (selection) => {
|
|
processAlias: selection[i].processes[j].processAlias,
|
|
processAlias: selection[i].processes[j].processAlias,
|
|
processCode: selection[i].processes[j].processCode,
|
|
processCode: selection[i].processes[j].processCode,
|
|
processStepNumber: selection[i].processes[j].processStepNumber,
|
|
processStepNumber: selection[i].processes[j].processStepNumber,
|
|
- productionDeptId:selection[i].productionDeptId,
|
|
|
|
|
|
+ productionDeptId: selection[i].productionDeptId,
|
|
status: 0,
|
|
status: 0,
|
|
auditNum: 0,
|
|
auditNum: 0,
|
|
};
|
|
};
|
|
- form.value.details.push(newDetail);
|
|
|
|
|
|
+ form.value.detailInfo.push(newDetail);
|
|
}
|
|
}
|
|
|
|
+ //页面显示内容,一个批次一行
|
|
|
|
+ const detail = {
|
|
|
|
+ outsourceDetailId: selection[i].id,
|
|
|
|
+ productDescription: selection[i].productDescription,
|
|
|
|
+ lotCode: selection[i].lotCode,
|
|
|
|
+ productNum: selection[i].productNum,
|
|
|
|
+ receiptNum:
|
|
|
|
+ selection[i].processes[selection[i].processes.length - 1].qualifiedNum
|
|
|
|
+ ? selection[i].processes[selection[i].processes.length - 1].qualifiedNum
|
|
|
|
+ : 0,
|
|
|
|
+ newCarrier: selection[i].newCarrier,
|
|
|
|
+ remark: "",
|
|
|
|
+ processAlias: selection[i].processNames,
|
|
|
|
+ productionDeptId: selection[i].productionDeptId,
|
|
|
|
+ status: 0,
|
|
|
|
+ auditNum: 0,
|
|
|
|
+ };
|
|
|
|
+ form.value.details.push(detail);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
//审核状态按钮
|
|
//审核状态按钮
|
|
@@ -368,6 +393,8 @@ function submitForm() {
|
|
}
|
|
}
|
|
console.log(form.value.details.length);
|
|
console.log(form.value.details.length);
|
|
if (flag) {
|
|
if (flag) {
|
|
|
|
+ //赋值(因为收回明细是一个批次一条,所以后端传回来两个集合,一个页面显示,一个后端保存)
|
|
|
|
+ handleSetAuditStatus();
|
|
console.log(form.value);
|
|
console.log(form.value);
|
|
if (confirmFlag) {
|
|
if (confirmFlag) {
|
|
proxy.$modal
|
|
proxy.$modal
|
|
@@ -415,25 +442,58 @@ function submitForm() {
|
|
}
|
|
}
|
|
//反选操作
|
|
//反选操作
|
|
function handleDelReturnReceiveDetail(row) {
|
|
function handleDelReturnReceiveDetail(row) {
|
|
- console.log(row)
|
|
|
|
- if(form.value.id) {
|
|
|
|
- if(row.productionDeptId!=0) {
|
|
|
|
- proxy.$modal.msgError("该批次已周转,不能删除");
|
|
|
|
- }else{
|
|
|
|
- proxy.$modal
|
|
|
|
- .confirm("是否确认删除选中的数据项,如果删除,同时删除该批次下所有工序?")
|
|
|
|
- .then(function () {
|
|
|
|
- form.value.details = form.value.details.filter((item) => {
|
|
|
|
- return item.lotId != row.lotId;
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ console.log(row);
|
|
|
|
+ if (form.value.id) {
|
|
|
|
+ if (row.productionDeptId != 0) {
|
|
|
|
+ proxy.$modal.msgError("该批次已周转,不能删除");
|
|
|
|
+ } else {
|
|
|
|
+ proxy.$modal
|
|
|
|
+ .confirm(
|
|
|
|
+ "是否确认删除选中的数据项,如果删除,同时删除该批次下所有工序?"
|
|
|
|
+ )
|
|
|
|
+ .then(function () {
|
|
|
|
+ form.value.details = form.value.details.filter((item) => {
|
|
|
|
+ return item.lotCode != row.lotCode;
|
|
|
|
+ });
|
|
|
|
+ //修改存进数据库的数据
|
|
|
|
+ let index = [];
|
|
|
|
+ for (let i = 0; i < form.value.detailInfo.length; i++) {
|
|
|
|
+ if (form.value.detailInfo[i].lotCode == row.lotCode) {
|
|
|
|
+ index.push(i);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (let i = index.length - 1; i >= 0; i--) {
|
|
|
|
+ form.value.detailInfo.splice(index[i], 1);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ form.value.details.splice(form.value.details.indexOf(row), 1);
|
|
|
|
+ //修改存进数据库的数据
|
|
|
|
+ let index = [];
|
|
|
|
+ for (let i = 0; i < form.value.detailInfo.length; i++) {
|
|
|
|
+ if (form.value.detailInfo[i].lotCode == row.lotCode) {
|
|
|
|
+ index.push(i);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (let i = index.length - 1; i >= 0; i--) {
|
|
|
|
+ form.value.detailInfo.splice(index[i], 1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ console.log(form.value)
|
|
}
|
|
}
|
|
-else{
|
|
|
|
- form.value.details.splice(form.value.details.indexOf(row), 1)
|
|
|
|
-}
|
|
|
|
|
|
+//审核状态,备注,确定数量赋值
|
|
|
|
+function handleSetAuditStatus() {
|
|
|
|
+ for (let i = 0; i < form.value.details.length; i++) {
|
|
|
|
+ form.value.detailInfo.forEach((element) => {
|
|
|
|
+ if (form.value.details[i].lotCode == element.lotCode) {
|
|
|
|
+ element.remark = form.value.details[i].remark;
|
|
|
|
+ element.status = form.value.details[i].status;
|
|
|
|
+ element.auditNum = form.value.details[i].auditNum;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
/** 暴露给父组件的方法 */
|
|
/** 暴露给父组件的方法 */
|
|
defineExpose({
|
|
defineExpose({
|
|
open,
|
|
open,
|