This commit is contained in:
2026-02-04 15:28:03 +08:00
parent 7340260cb2
commit 2b759f0000
2 changed files with 76 additions and 24 deletions

View File

@@ -355,8 +355,8 @@
</el-table-column>
<el-table-column label="库位" align="center" width="150">
<template #default="scope">
<el-select v-model="scope.row.pcode" clearable filterable placeholder="请选择库位">
<el-option v-for="item in kwOptions" :key="item.id" :label="item.pcode" :value="item.pcode" />
<el-select v-model="scope.row.pcode" clearable @change="changePcode" filterable placeholder="请选择库位">
<el-option v-for="(item, index) in kwOptions" :key="index" :label="item.pcode" :value="item.pcode" />
</el-select>
</template>
</el-table-column>
@@ -945,6 +945,14 @@ function addLineFun() {
planList.value.push(info);
}
// 选择库位修改库位数组
const changePcode = (e) => {
let index = kwOptions.value.findIndex((item) => item.pcode == e);
kwOptions.value.splice(index, 1);
kwOptions.value.unshift({ pcode: e });
console.log(e, index);
}
//添加数量
function addNum(row) {
let addRow = {};
@@ -980,19 +988,19 @@ function submitForm() {
proxy.$modal.msgError("现场图片不能为空");
return;
}
let iscfwz = false; //库位是否为空
let bigData = checkPlanList.value;
for (let i = 0; i < bigData.length; i++) {
//库位
if (!bigData[i].pcode) {
iscfwz = true;
}
}
// let iscfwz = false; //库位是否为空
// let bigData = checkPlanList.value;
// for (let i = 0; i < bigData.length; i++) {
// //库位
// if (!bigData[i].pcode) {
// iscfwz = true;
// }
// }
//发现场入库类型可以不用选库位
if (storeData.value.operationType != "RK025" && iscfwz) {
proxy.$modal.msgError("请选择库位");
return;
}
// if (storeData.value.operationType != "RK025" && iscfwz) {
// proxy.$modal.msgError("请选择库位");
// return;
// }
// if(isExamine.value==1 && !storeData.value.approverId){
// proxy.$modal.msgError("审批人不能为空");
// return