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

View File

@@ -400,6 +400,7 @@
<el-input
v-model="outQueryParams.xmNo"
placeholder="请输入项目号"
clearable
/>
</el-form-item>
</el-col>
@@ -408,6 +409,7 @@
<el-input
v-model="outQueryParams.sapNo"
placeholder="请输入订单号"
clearable
/>
</el-form-item>
</el-col>
@@ -416,6 +418,7 @@
<el-input
v-model="outQueryParams.wlNo"
placeholder="请输入物料号"
clearable
/>
</el-form-item>
</el-col>
@@ -424,6 +427,7 @@
<el-input
v-model="outQueryParams.wlMs"
placeholder="请输入物料描述"
clearable
/>
</el-form-item>
</el-col>
@@ -431,12 +435,12 @@
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="项目描述">
<el-input v-model="outQueryParams.xmMs" placeholder="项目描述" />
<el-input v-model="outQueryParams.xmMs" clearable placeholder="项目描述" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="库位">
<el-input v-model="outQueryParams.pcode" placeholder="库位" />
<el-input v-model="outQueryParams.pcode" clearable placeholder="库位" />
</el-form-item>
</el-col>
<el-col :span="6">
@@ -466,6 +470,7 @@
label: 'warehouseName',
value: 'warehouseCode',
}"
clearable
/>
</el-form-item>
</el-col>
@@ -473,16 +478,17 @@
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="供应商">
<el-input v-model="outQueryParams.gysMc" placeholder="供应商" />
<el-input v-model="outQueryParams.gysMc" clearable placeholder="供应商" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="备注">
<el-input v-model="outQueryParams.remark" placeholder="备注" />
<el-input v-model="outQueryParams.remark" clearable placeholder="备注" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="searchPlan">查询</el-button>
<el-button @click="searchReset">重置</el-button>
</el-col>
</el-row>
<el-row :gutter="20">
@@ -953,7 +959,6 @@ import { getToken } from "@/utils/auth";
import bill from "@/components/storageBill/bill.vue";
import printBill from "@/components/printBill/bill.vue";
import { ref } from "vue";
import { pl } from "element-plus/es/locales.mjs";
const headers = ref({
Authorization: "Bearer " + getToken(),
@@ -989,7 +994,13 @@ const resource = ref(""); //调度模式 1仅立库2立库+AGV
const data = reactive({
form: {},
storeData: {}, //出库数据
storeData: {
teamCode: null,
operationType: null,
operator: null,
execStatus: null,
isDelivery: null,
}, //出库数据
rules: {
operationType: [
{ required: true, message: "出库类型不能为空", trigger: "change" },
@@ -1156,6 +1167,23 @@ function searchPlan() {
});
}
const searchReset = () => {
outQueryParams.value = {
xmNo: "",
sapNo: "",
wlNo: "",
wlMs: "",
xmMs: "",
pcode: "",
wlType: "",
cangku: [],
gysMc: "",
pageNum: 1,
pageSize: 50,
remark: "",
}
}
//出库 多选框选中数据
const checkOutList = ref([]);
function handleSelectionChange(selection) {
@@ -1208,14 +1236,18 @@ const deleteOutBoundData = () => {
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
outBoundData.value = [];
title.value = "添加出库单据";
nextTick(() => {
// proxy.$refs["stockRef"].resetFields();
reset();
})
}
/** 提交按钮 */
function submitForm() {
console.log(storeData.value, outQueryParams.value)
if (outBoundData.value.length !== checkOutList.value.length) {
proxy.$modal.msgError("请查看勾选数据");
return;
@@ -1261,16 +1293,28 @@ function handleExport() {
// 取消按钮
function cancel() {
stockRef.value.clearValidate();
open.value = false;
reset();
}
const stockRef = ref(null);
// 表单重置
function reset() {
planList.value = [];
storeData.value = {};
orderNum.value = "";
proxy.resetForm("stockRef");
storeData.value.execStatus = null
storeData.value.isDelivery = null
outQueryParams.value.xmNo = ""
outQueryParams.value.sapNo = ""
outQueryParams.value.wlMs = ""
outQueryParams.value.xmMs = ""
outQueryParams.value.pcode = ""
outQueryParams.value.cangku = []
outQueryParams.value.gysMc = ""
outQueryParams.value.remark = ""
nextTick(() => {
stockRef.value.clearValidate()
});
}
/** 搜索按钮操作 */