-
-
+
@@ -706,7 +706,8 @@ const childrenTableInfoForm = ref
({
printCopies: 1,
packageQtyList: [] as number[],
packageMode: 'average',
- batchCode: ''
+ batchCode: '',
+ createTime: '',
})
@@ -719,7 +720,7 @@ const queryForm = ref({
instockMethond: '',
auditStatus: '',
pageNum: 1,
- pageSize: 10
+ pageSize: 10,
})
// 获取路由实例
@@ -734,6 +735,18 @@ if (route.query.instockMethond) {
queryForm.value.instockMethond = instockMethondValue;
routeInstockMethondValue = instockMethondValue; // 保存路由参数值
}
+// 初始化时获取路由参数并设置到查询表单
+let routeInstockTypeValue = '';
+if (route.query.instockType) {
+ // 确保值是字符串类型,如果是数组则取第一个元素
+ const instockTypeValue = Array.isArray(route.query.instockType)
+ ? route.query.instockType[0]
+ : route.query.instockType;
+ queryForm.value.instockType = instockTypeValue;
+ routeInstockTypeValue = instockTypeValue; // 保存路由参数值
+}
+
+
const parentTableRef = ref()
const parentTableData = ref([])
@@ -811,7 +824,7 @@ const submitForm = async() => {
return
}
}
-
+
// 将最终的分包数量传递给后端
childrenTableInfoForm.value.packageQtyList = finalPackageList
childrenTableInfoForm.value.packageMode = packageMode.value // 传递模式信息
@@ -923,7 +936,7 @@ const reset = () => {
instockCode: '',
materialCategoryId: '',
materialCategoryName: '',
- instockType: '',
+ instockType: routeInstockTypeValue,
instockMethond: routeInstockMethondValue,// 使用保存的路由参数值
auditStatus: '',
pageNum: 1,
@@ -954,7 +967,7 @@ const viewDetails = (e) => {
// 父表格新增
const parentTableAdd = () => {
dialogVisible.value = true;
- dialogForm.value = { instockType: '', orderNo: '', materialCategoryId: '', warehouseId: '' };
+ dialogForm.value = { instockType: '', orderNo: '', materialCategoryId: '', warehouseId: '' };
dialogtable.value = [];
// 清空表单验证状态
setTimeout(() => {
@@ -1044,14 +1057,14 @@ const dialogSubmit = async () => {
ElMessage.error('表单引用未找到');
return;
}
-
+
try {
await dialogFormRef.value.validate();
} catch (error) {
ElMessage.error('请填写完整的表单信息');
return;
}
-
+
console.log(dialogtable.value)
// 将前端行映射为后端明细字段,并进行基本校验与过滤
const detailList = (dialogtable.value || [])
@@ -1264,7 +1277,7 @@ const handleAssociatePurchaseOrder = async () => {
try {
// 使用新的API获取带统计数据的采购订单物料列表
- const res = await getWmsPurchaseOrderDetailWithStatistics({
+ const res = await getWmsPurchaseOrderDetailWithStatistics({
poNo: order.poNo
});
dialogtable.value = res.data.map(item => ({
@@ -1356,14 +1369,14 @@ const onSplitPackageCountChange = (count) => {
if (count > 1) {
// 默认使用平均分包模式
packageMode.value = 'average'
-
+
// 初始化数组
packageQtyList.value = new Array(count).fill(1)
averagePackageList.value = new Array(count).fill(1)
-
+
// 计算平均分包
calculateAveragePackage(count)
-
+
// 同时初始化自定义数量为平均值(作为备用)
packageQtyList.value = [...averagePackageList.value]
} else {
@@ -1379,7 +1392,7 @@ const calculateAveragePackage = (count) => {
if (remaining > 0 && count > 0) {
const avgQty = Math.floor(remaining / count)
const remainder = remaining % count
-
+
for (let i = 0; i < count; i++) {
averagePackageList.value[i] = avgQty + (i < remainder ? 1 : 0)
}
@@ -1399,7 +1412,7 @@ const onPackageModeChange = (mode) => {
const validateTotalQty = () => {
const total = totalPackageQty.value
const remaining = remainingQty.value
-
+
if (total > remaining) {
ElMessage.warning(`每包数量总计不能超过剩余数量 ${remaining}`)
}
diff --git a/src/views/wms/instockPrint/index.vue b/src/views/wms/instockPrint/index.vue
index db271e9..6bd656a 100644
--- a/src/views/wms/instockPrint/index.vue
+++ b/src/views/wms/instockPrint/index.vue
@@ -51,17 +51,17 @@
>
-
-
+
+
-
+
+
+
+
+
-
-
+
+
搜索
重置
@@ -138,6 +138,7 @@
+
@@ -232,6 +233,7 @@ const initFormData: InstockPrintForm = {
inboundStatus: undefined,
actualInboundTime: undefined,
}
+
const data = reactive>({
form: {...initFormData},
queryParams: {
@@ -335,7 +337,7 @@ const columns = ref([
{ key: 9, label: `物料规格`, visible: true },
{ key: 10, label: `计量单位名称`, visible: true },
{ key: 11, label: `是否有条码`, visible: true },
- { key: 12, label: `物料大类`, visible: true },
+ { key: 12, label: `物料大类`, visible: false },
// { key: 13, label: `推荐库位id`, visible: inboundStatusdVisble.value },
// { key: 14, label: `入库状态(0-待入库,1-已入库,2-入库中)`, visible: inboundStatusdVisble.value },
// { key: 15, label: `实际入库时间`, visible: inboundStatusdVisble.value },
diff --git a/src/views/wms/instockRecord/index.vue b/src/views/wms/instockRecord/index.vue
index 10654a7..daf287b 100644
--- a/src/views/wms/instockRecord/index.vue
+++ b/src/views/wms/instockRecord/index.vue
@@ -26,15 +26,15 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -83,7 +83,7 @@
-
+
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
@@ -119,7 +119,7 @@
-
+
@@ -221,11 +221,11 @@ const columns = ref([
{ key: 6, label: `物料编码`, visible: true },
{ key: 7, label: `物料名称`, visible: true },
{ key: 8, label: `入库数量`, visible: true },
- { key: 9, label: `物料大类`, visible: true },
+ { key: 9, label: `物料大类`, visible: false },
{ key: 10, label: `入库人`, visible: true },
{ key: 11, label: `创建时间`, visible: true },
{ key: 12, label: `erp同步状态`, visible: false },
- { key: 13, label: `erp同步数量`, visible: false },
+ { key: 13, label: `erp同步数量`, visible: false },
// { key: 14, label: `修改人`, visible: true },
{ key: 14, label: `同步时间`, visible: true },
{ key: 15, label: `特殊标识`, visible: true },
@@ -248,6 +248,7 @@ const initFormData: InstockRecordForm = {
erpSynchronousQty: undefined,
specialType: undefined,
}
+
const data = reactive>({
form: {...initFormData},
queryParams: {
@@ -266,6 +267,7 @@ const data = reactive>({
params: {
}
},
+
rules: {
erpSynchronousStatus: [
{ required: true, message: "erp同步状态不能为空", trigger: "change" }
diff --git a/src/views/wms/wmsPurchaseOrder/index.vue b/src/views/wms/wmsPurchaseOrder/index.vue
index fba5d8c..f825cb5 100644
--- a/src/views/wms/wmsPurchaseOrder/index.vue
+++ b/src/views/wms/wmsPurchaseOrder/index.vue
@@ -291,7 +291,7 @@ const columns = ref([
{ key: 10, label: `创建时间`, visible: false },
{ key: 11, label: `更新人`, visible: false },
{ key: 12, label: `更新时间`, visible: false },
- { key: 13, label: `物料大类`, visible: true },
+ { key: 13, label: `物料大类`, visible: false },
{ key: 14, label: `审核人`, visible: false },
{ key: 15, label: `审核时间`, visible: false },
{ key: 16, label: `审核状态`, visible: false },
diff --git a/src/views/wms/wmsPurchaseOrderCopy/index.vue b/src/views/wms/wmsPurchaseOrderCopy/index.vue
index 4399674..5501f82 100644
--- a/src/views/wms/wmsPurchaseOrderCopy/index.vue
+++ b/src/views/wms/wmsPurchaseOrderCopy/index.vue
@@ -15,15 +15,15 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -63,11 +63,11 @@
-
-
-
-
-
+
+
+
+
+
{{ parseTime(scope.row.planDeliveryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}
@@ -342,7 +342,7 @@
-