|
|
|
|
@ -5,11 +5,11 @@
|
|
|
|
|
<el-form-item label="入库单号">
|
|
|
|
|
<el-input v-model="queryForm.instockCode" placeholder="输入调拨单号" clearable/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工单类型" prop="instockType">
|
|
|
|
|
<!-- <el-form-item label="工单类型" prop="instockType">
|
|
|
|
|
<el-select v-model="queryForm.instockType" placeholder="请选择工单类型" clearable >
|
|
|
|
|
<el-option v-for="dict in wms_instock_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="入库方式" prop="instockMethond">-->
|
|
|
|
|
<!-- <el-select v-model="queryForm.instockMethond" placeholder="请选择入库方式" clearable >-->
|
|
|
|
|
<!-- <el-option v-for="dict in instock_methond" :key="dict.value" :label="dict.label" :value="dict.value"/>-->
|
|
|
|
|
@ -172,7 +172,7 @@
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="工单类型" prop="instockType">
|
|
|
|
|
<!-- <el-form-item label="工单类型" prop="instockType">
|
|
|
|
|
<el-select v-model="dialogForm.instockType" placeholder="请选择工单类型" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in wms_instock_type"
|
|
|
|
|
@ -181,7 +181,7 @@
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
<el-form-item label="订单编号" prop="orderNo">
|
|
|
|
|
<el-input v-model="dialogForm.orderNo" placeholder="请输入订单编号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -658,6 +658,21 @@ import { getWmsPurchaseOrderList } from '@/api/wms/wmsPurchaseOrder';
|
|
|
|
|
import { useRoute } from 'vue-router';
|
|
|
|
|
import { parseTime } from '@/utils/ruoyi';
|
|
|
|
|
|
|
|
|
|
// 获取路由实例
|
|
|
|
|
const route = useRoute();// 获取路由实例
|
|
|
|
|
|
|
|
|
|
// 修复路由参数获取逻辑
|
|
|
|
|
const getRouteParam = (paramName: string): string => {
|
|
|
|
|
const param = route.query[paramName];
|
|
|
|
|
if (!param) return '';
|
|
|
|
|
return Array.isArray(param) ? param[0] : param;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const instockTypeValue = getRouteParam('instockType');
|
|
|
|
|
const instockMethondValue = getRouteParam('instockMethond');
|
|
|
|
|
// ... 现有代码 ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const {audit_behave,
|
|
|
|
|
wms_barcode_if,
|
|
|
|
|
@ -688,12 +703,19 @@ const childrenTableInfoVisible = ref(false)
|
|
|
|
|
// const childrenTableInfoSubmit = ref(false)
|
|
|
|
|
const updateDialog = ref(false)
|
|
|
|
|
const dialogTitle = ref('添加')
|
|
|
|
|
const dialogForm = ref<InstockOrderForm>({ instockType: '', orderNo: '', materialCategoryId: '', warehouseId: '' });
|
|
|
|
|
const dialogForm = ref<InstockOrderForm>({
|
|
|
|
|
instockType: instockTypeValue || '' ,
|
|
|
|
|
orderNo: '',
|
|
|
|
|
materialCategoryId: '',
|
|
|
|
|
warehouseId: '',
|
|
|
|
|
instockMethond: instockMethondValue || '' ,
|
|
|
|
|
});
|
|
|
|
|
const parentTableInfoForm = ref<any>({
|
|
|
|
|
materialCategoryId: '',
|
|
|
|
|
instockType: '',
|
|
|
|
|
instockType: instockTypeValue || '' ,
|
|
|
|
|
auditBy: '',
|
|
|
|
|
warehouseCode: ''
|
|
|
|
|
warehouseCode: '',
|
|
|
|
|
instockMethond: instockMethondValue || '' ,
|
|
|
|
|
})
|
|
|
|
|
const parentTableApproveForm = ref<any>({
|
|
|
|
|
auditStatus: '',
|
|
|
|
|
@ -710,6 +732,7 @@ const childrenTableInfoForm = ref<any>({
|
|
|
|
|
packageMode: 'average',
|
|
|
|
|
batchCode: '',
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -718,22 +741,21 @@ const queryForm = ref({
|
|
|
|
|
materialCategoryId: '',
|
|
|
|
|
materialCategoryName: '',
|
|
|
|
|
warehouseId: '',
|
|
|
|
|
instockType: '',
|
|
|
|
|
instockMethond: '',
|
|
|
|
|
instockType: instockTypeValue || '' ,
|
|
|
|
|
instockMethond: instockMethondValue || '' ,
|
|
|
|
|
auditStatus: '',
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 获取路由实例
|
|
|
|
|
const route = useRoute();// 获取路由实例
|
|
|
|
|
|
|
|
|
|
// 初始化时获取路由参数并设置到查询表单
|
|
|
|
|
let routeInstockMethondValue = '';
|
|
|
|
|
if (route.query.instockMethond) {
|
|
|
|
|
// 确保值是字符串类型,如果是数组则取第一个元素
|
|
|
|
|
const instockMethondValue = Array.isArray(route.query.instockMethond)
|
|
|
|
|
? route.query.instockMethond[0]
|
|
|
|
|
: route.query.instockMethond;
|
|
|
|
|
// const instockMethondValue = Array.isArray(route.query.instockMethond)
|
|
|
|
|
// ? route.query.instockMethond[0]
|
|
|
|
|
// : route.query.instockMethond;
|
|
|
|
|
queryForm.value.instockMethond = instockMethondValue;
|
|
|
|
|
routeInstockMethondValue = instockMethondValue; // 保存路由参数值
|
|
|
|
|
}
|
|
|
|
|
@ -741,9 +763,9 @@ if (route.query.instockMethond) {
|
|
|
|
|
let routeInstockTypeValue = '';
|
|
|
|
|
if (route.query.instockType) {
|
|
|
|
|
// 确保值是字符串类型,如果是数组则取第一个元素
|
|
|
|
|
const instockTypeValue = Array.isArray(route.query.instockType)
|
|
|
|
|
? route.query.instockType[0]
|
|
|
|
|
: route.query.instockType;
|
|
|
|
|
// const instockTypeValue = Array.isArray(route.query.instockType)
|
|
|
|
|
// ? route.query.instockType[0]
|
|
|
|
|
// : route.query.instockType;
|
|
|
|
|
queryForm.value.instockType = instockTypeValue;
|
|
|
|
|
routeInstockTypeValue = instockTypeValue; // 保存路由参数值
|
|
|
|
|
}
|
|
|
|
|
@ -772,7 +794,7 @@ const state = reactive({
|
|
|
|
|
productionOrders: [],
|
|
|
|
|
selectedPurchaseOrder: null,
|
|
|
|
|
selectedProductionOrder: null,
|
|
|
|
|
isPurchaseOrderAssociated: false
|
|
|
|
|
isPurchaseOrderAssociated: false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 获取仓库
|
|
|
|
|
@ -980,8 +1002,25 @@ const viewDetails = (e) => {
|
|
|
|
|
// 父表格新增
|
|
|
|
|
const parentTableAdd = () => {
|
|
|
|
|
dialogVisible.value = true;
|
|
|
|
|
dialogForm.value = { instockType: '', orderNo: '', materialCategoryId: '', warehouseId: '' };
|
|
|
|
|
dialogForm.value = {
|
|
|
|
|
instockType: instockTypeValue || '',
|
|
|
|
|
orderNo: '',
|
|
|
|
|
materialCategoryId: '',
|
|
|
|
|
warehouseId: '',
|
|
|
|
|
instockMethond: instockMethondValue || ''
|
|
|
|
|
};
|
|
|
|
|
dialogtable.value = [];
|
|
|
|
|
|
|
|
|
|
// 手动触发工单类型变更逻辑,确保采购订单相关组件正确显示
|
|
|
|
|
if (dialogForm.value.instockType === '1') {
|
|
|
|
|
state.showPurchaseOrderSelect = true;
|
|
|
|
|
loadPurchaseOrders();
|
|
|
|
|
} else if (dialogForm.value.instockType === '2') {
|
|
|
|
|
state.showProductionOrderSelect = true;
|
|
|
|
|
loadProductionOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 清空表单验证状态
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
if (dialogFormRef.value) {
|
|
|
|
|
|