修改
This commit is contained in:
@@ -355,8 +355,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库位" align="center" width="150">
|
<el-table-column label="库位" align="center" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-select v-model="scope.row.pcode" clearable filterable placeholder="请选择库位">
|
<el-select v-model="scope.row.pcode" clearable @change="changePcode" filterable placeholder="请选择库位">
|
||||||
<el-option v-for="item in kwOptions" :key="item.id" :label="item.pcode" :value="item.pcode" />
|
<el-option v-for="(item, index) in kwOptions" :key="index" :label="item.pcode" :value="item.pcode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -945,6 +945,14 @@ function addLineFun() {
|
|||||||
planList.value.push(info);
|
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) {
|
function addNum(row) {
|
||||||
let addRow = {};
|
let addRow = {};
|
||||||
@@ -980,19 +988,19 @@ function submitForm() {
|
|||||||
proxy.$modal.msgError("现场图片不能为空");
|
proxy.$modal.msgError("现场图片不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let iscfwz = false; //库位是否为空
|
// let iscfwz = false; //库位是否为空
|
||||||
let bigData = checkPlanList.value;
|
// let bigData = checkPlanList.value;
|
||||||
for (let i = 0; i < bigData.length; i++) {
|
// for (let i = 0; i < bigData.length; i++) {
|
||||||
//库位
|
// //库位
|
||||||
if (!bigData[i].pcode) {
|
// if (!bigData[i].pcode) {
|
||||||
iscfwz = true;
|
// iscfwz = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//发现场入库类型可以不用选库位
|
//发现场入库类型可以不用选库位
|
||||||
if (storeData.value.operationType != "RK025" && iscfwz) {
|
// if (storeData.value.operationType != "RK025" && iscfwz) {
|
||||||
proxy.$modal.msgError("请选择库位");
|
// proxy.$modal.msgError("请选择库位");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
// if(isExamine.value==1 && !storeData.value.approverId){
|
// if(isExamine.value==1 && !storeData.value.approverId){
|
||||||
// proxy.$modal.msgError("审批人不能为空");
|
// proxy.$modal.msgError("审批人不能为空");
|
||||||
// return
|
// return
|
||||||
|
|||||||
@@ -400,6 +400,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="outQueryParams.xmNo"
|
v-model="outQueryParams.xmNo"
|
||||||
placeholder="请输入项目号"
|
placeholder="请输入项目号"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -408,6 +409,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="outQueryParams.sapNo"
|
v-model="outQueryParams.sapNo"
|
||||||
placeholder="请输入订单号"
|
placeholder="请输入订单号"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -416,6 +418,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="outQueryParams.wlNo"
|
v-model="outQueryParams.wlNo"
|
||||||
placeholder="请输入物料号"
|
placeholder="请输入物料号"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -424,6 +427,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="outQueryParams.wlMs"
|
v-model="outQueryParams.wlMs"
|
||||||
placeholder="请输入物料描述"
|
placeholder="请输入物料描述"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -431,12 +435,12 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="项目描述">
|
<el-form-item label="项目描述">
|
||||||
<el-input v-model="outQueryParams.xmMs" placeholder="项目描述" />
|
<el-input v-model="outQueryParams.xmMs" clearable placeholder="项目描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="库位">
|
<el-form-item label="库位">
|
||||||
<el-input v-model="outQueryParams.pcode" placeholder="库位" />
|
<el-input v-model="outQueryParams.pcode" clearable placeholder="库位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -466,6 +470,7 @@
|
|||||||
label: 'warehouseName',
|
label: 'warehouseName',
|
||||||
value: 'warehouseCode',
|
value: 'warehouseCode',
|
||||||
}"
|
}"
|
||||||
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -473,16 +478,17 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="供应商">
|
<el-form-item label="供应商">
|
||||||
<el-input v-model="outQueryParams.gysMc" placeholder="供应商" />
|
<el-input v-model="outQueryParams.gysMc" clearable placeholder="供应商" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="outQueryParams.remark" placeholder="备注" />
|
<el-input v-model="outQueryParams.remark" clearable placeholder="备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary" @click="searchPlan">查询</el-button>
|
<el-button type="primary" @click="searchPlan">查询</el-button>
|
||||||
|
<el-button @click="searchReset">重置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
@@ -953,7 +959,6 @@ import { getToken } from "@/utils/auth";
|
|||||||
import bill from "@/components/storageBill/bill.vue";
|
import bill from "@/components/storageBill/bill.vue";
|
||||||
import printBill from "@/components/printBill/bill.vue";
|
import printBill from "@/components/printBill/bill.vue";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { pl } from "element-plus/es/locales.mjs";
|
|
||||||
|
|
||||||
const headers = ref({
|
const headers = ref({
|
||||||
Authorization: "Bearer " + getToken(),
|
Authorization: "Bearer " + getToken(),
|
||||||
@@ -989,7 +994,13 @@ const resource = ref(""); //调度模式 1仅立库;2立库+AGV
|
|||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
storeData: {}, //出库数据
|
storeData: {
|
||||||
|
teamCode: null,
|
||||||
|
operationType: null,
|
||||||
|
operator: null,
|
||||||
|
execStatus: null,
|
||||||
|
isDelivery: null,
|
||||||
|
}, //出库数据
|
||||||
rules: {
|
rules: {
|
||||||
operationType: [
|
operationType: [
|
||||||
{ required: true, message: "出库类型不能为空", trigger: "change" },
|
{ 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([]);
|
const checkOutList = ref([]);
|
||||||
function handleSelectionChange(selection) {
|
function handleSelectionChange(selection) {
|
||||||
@@ -1208,14 +1236,18 @@ const deleteOutBoundData = () => {
|
|||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset();
|
|
||||||
open.value = true;
|
open.value = true;
|
||||||
outBoundData.value = [];
|
outBoundData.value = [];
|
||||||
title.value = "添加出库单据";
|
title.value = "添加出库单据";
|
||||||
|
nextTick(() => {
|
||||||
|
// proxy.$refs["stockRef"].resetFields();
|
||||||
|
reset();
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
|
console.log(storeData.value, outQueryParams.value)
|
||||||
if (outBoundData.value.length !== checkOutList.value.length) {
|
if (outBoundData.value.length !== checkOutList.value.length) {
|
||||||
proxy.$modal.msgError("请查看勾选数据");
|
proxy.$modal.msgError("请查看勾选数据");
|
||||||
return;
|
return;
|
||||||
@@ -1261,16 +1293,28 @@ function handleExport() {
|
|||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
function cancel() {
|
function cancel() {
|
||||||
|
stockRef.value.clearValidate();
|
||||||
open.value = false;
|
open.value = false;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
const stockRef = ref(null);
|
||||||
|
|
||||||
// 表单重置
|
// 表单重置
|
||||||
function reset() {
|
function reset() {
|
||||||
planList.value = [];
|
planList.value = [];
|
||||||
storeData.value = {};
|
storeData.value.execStatus = null
|
||||||
orderNum.value = "";
|
storeData.value.isDelivery = null
|
||||||
proxy.resetForm("stockRef");
|
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()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|||||||
Reference in New Issue
Block a user