-
+
{{ pending.currentCoilNo }}
扫码时间:
@@ -110,19 +100,10 @@
@@ -148,79 +129,69 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
吨
-
+
吨
-
-
+
+
-
+
@@ -242,10 +213,7 @@
-
+
@@ -405,7 +373,7 @@ export default {
handleMaterialTypeChange(value) {
// 清空物品选择
this.$set(this.targetCoil, 'itemId', null);
-
+
// 根据材料类型设置物品类型并恢复完整列表
if (value === '成品') {
this.$set(this.targetCoil, 'itemType', 'product');
@@ -417,7 +385,7 @@ export default {
this.rawMaterialList = [...this.allRawMaterials];
}
},
-
+
// 加载第一个钢卷(从待操作进入时)
async loadFirstCoil(coilId) {
try {
@@ -479,7 +447,7 @@ export default {
async loadPendingMergeList() {
try {
this.pendingLoading = true;
-
+
// 分别查询待处理和处理中的记录
const responses = await Promise.all([
listPendingAction({
@@ -495,16 +463,16 @@ export default {
pageSize: 1000
})
]);
-
+
// 合并两个列表
const allPending = [
...(responses[0].rows || []),
...(responses[1].rows || [])
];
-
+
// 排除当前钢卷
const currentCoilId = this.sourceCoils[0] ? this.sourceCoils[0].coilId : null;
-
+
this.pendingMergeList = allPending.filter(item => item.coilId !== currentCoilId);
} catch (error) {
console.error('加载待合卷列表失败', error);
@@ -559,35 +527,35 @@ export default {
// 格式化物品名称(添加规格和参数信息)
formatItemName(item) {
if (!item) return '';
-
+
// 获取名称(原材料或产品)
const name = item.rawMaterialName || item.productName || '';
if (!name) return '';
-
+
let displayName = name;
const specs = [];
-
+
// 1. 优先显示规格(从对象的specification字段)
if (item.specification) {
specs.push(item.specification);
}
-
+
// 2. 添加参数参数(最多2个)
if (item.bomItems && item.bomItems.length > 0) {
const bomParams = item.bomItems
.filter(bomItem => bomItem.attrKey && bomItem.attrValue)
.slice(0, 2); // 最多2个参数参数
-
+
bomParams.forEach(param => {
specs.push(`${param.attrKey}:${param.attrValue}`);
});
}
-
+
// 3. 拼接成最终格式
if (specs.length > 0) {
displayName += `(${specs.join(' ')})`;
}
-
+
return displayName;
},
@@ -631,12 +599,12 @@ export default {
if (!itemType) {
return;
}
-
+
try {
this.itemSearchLoading = true;
if (itemType === 'raw_material') {
- const response = await listRawMaterial({
- pageNum: 1,
+ const response = await listRawMaterial({
+ pageNum: 1,
pageSize: 100,
withBom: true
});
@@ -644,8 +612,8 @@ export default {
this.rawMaterialList = response.rows || [];
}
} else if (itemType === 'product') {
- const response = await listProduct({
- pageNum: 1,
+ const response = await listProduct({
+ pageNum: 1,
pageSize: 100,
withBom: true
});
@@ -666,7 +634,7 @@ export default {
this.$message.warning('请先选择材料类型');
return;
}
-
+
// 如果没有输入,恢复完整列表
if (!query || query.trim() === '') {
if (this.targetCoil.itemType === 'raw_material') {
@@ -676,10 +644,10 @@ export default {
}
return;
}
-
+
// 前端过滤:在已加载的数据中搜索
const searchQuery = query.toLowerCase().trim();
-
+
if (this.targetCoil.itemType === 'raw_material') {
// 从备份列表中过滤原材料
this.rawMaterialList = this.allRawMaterials.filter(item => {
@@ -688,11 +656,11 @@ export default {
// 搜索规格
const specMatch = item.specification && item.specification.toLowerCase().includes(searchQuery);
// 搜索 参数 参数
- const bomMatch = item.bomItems && item.bomItems.some(bom =>
+ const bomMatch = item.bomItems && item.bomItems.some(bom =>
(bom.attrKey && bom.attrKey.toLowerCase().includes(searchQuery)) ||
(bom.attrValue && bom.attrValue.toLowerCase().includes(searchQuery))
);
-
+
return nameMatch || specMatch || bomMatch;
});
} else if (this.targetCoil.itemType === 'product') {
@@ -703,11 +671,11 @@ export default {
// 搜索规格
const specMatch = item.specification && item.specification.toLowerCase().includes(searchQuery);
// 搜索 参数 参数
- const bomMatch = item.bomItems && item.bomItems.some(bom =>
+ const bomMatch = item.bomItems && item.bomItems.some(bom =>
(bom.attrKey && bom.attrKey.toLowerCase().includes(searchQuery)) ||
(bom.attrValue && bom.attrValue.toLowerCase().includes(searchQuery))
);
-
+
return nameMatch || specMatch || bomMatch;
});
}
@@ -837,7 +805,7 @@ export default {
text: '正在合卷,请稍后...',
background: 'rgba(0, 0, 0, 0.7)'
});
-
+
const response = await mergeMaterialCoil(mergeData);
if (response.code === 200) {
this.$message.success('合卷保存成功');
@@ -1123,17 +1091,17 @@ export default {
align-items: flex-start;
margin-bottom: 8px;
font-size: 13px;
-
+
&:last-child {
margin-bottom: 0;
}
-
+
.detail-label {
color: #909399;
min-width: 90px;
flex-shrink: 0;
}
-
+
.detail-value {
color: #303133;
flex: 1;
@@ -1159,12 +1127,12 @@ export default {
align-items: center;
margin-bottom: 6px;
font-size: 12px;
-
+
.bom-key {
color: #909399;
min-width: 60px;
}
-
+
.bom-value {
color: #303133;
flex: 1;
@@ -1288,4 +1256,3 @@ export default {
}
}
-
diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue
index bb6edcc2..792c3977 100644
--- a/klp-ui/src/views/wms/coil/panels/base.vue
+++ b/klp-ui/src/views/wms/coil/panels/base.vue
@@ -16,10 +16,12 @@
-->
-
+
-
+
-
+
-
+
-
+
-
+
搜索
重置
@@ -71,14 +74,14 @@
-
-
+
+
-
+ -->
+
@@ -100,7 +103,7 @@
-->
-
+
@@ -109,7 +112,8 @@
-
+
@@ -162,7 +166,8 @@
-
+
@@ -181,13 +186,36 @@
style="width: 100%;" clearable />
请先选择材料类型
-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -357,7 +385,7 @@ export default {
return '原料类型';
}
return '物品类型';
- }
+ },
},
created() {
this.getList();
@@ -367,7 +395,7 @@ export default {
handleMaterialTypeChange(value) {
// 清空物品选择
this.form.itemId = null;
-
+
// 根据材料类型设置物品类型
if (value === '成品') {
this.form.itemType = 'product';
@@ -378,7 +406,7 @@ export default {
/** 查询钢卷物料列表 */
getList() {
this.loading = true;
- const { updateTime ,...query } = {
+ const { updateTime, ...query } = {
...this.queryParams,
startTime: this.queryParams.updateTime?.[0],
endTime: this.queryParams.updateTime?.[1],
@@ -504,7 +532,7 @@ export default {
handleAdd() {
this.isCheck = false;
this.reset();
-
+
// 如果父组件传入了 materialType,使用它作为默认值
if (this.querys.materialType) {
this.form.materialType = this.querys.materialType;
@@ -515,7 +543,7 @@ export default {
this.form.itemType = 'raw_material';
}
}
-
+
this.open = true;
this.title = "添加钢卷物料";
},
@@ -528,7 +556,7 @@ export default {
getMaterialCoil(coilId).then(response => {
this.loading = false;
this.form = response.data;
-
+
// 设置 materialType(优先级:后端返回 > itemType推断 > 父组件传入)
if (!this.form.materialType) {
if (this.form.itemType) {
@@ -549,7 +577,7 @@ export default {
}
}
}
-
+
this.open = true;
this.title = "修改钢卷物料";
});
@@ -562,7 +590,7 @@ export default {
getMaterialCoil(coilId).then(response => {
this.loading = false;
this.form = response.data;
-
+
// 设置 materialType(优先级:后端返回 > itemType推断 > 父组件传入)
if (!this.form.materialType) {
if (this.form.itemType) {
@@ -583,7 +611,7 @@ export default {
}
}
}
-
+
this.open = true;
this.title = "修改钢卷物料";
});
diff --git a/klp-ui/src/views/wms/coil/split.vue b/klp-ui/src/views/wms/coil/split.vue
index 32db8884..997bab7c 100644
--- a/klp-ui/src/views/wms/coil/split.vue
+++ b/klp-ui/src/views/wms/coil/split.vue
@@ -88,8 +88,10 @@
子卷列表
- 复制到全部
- 添加子卷
+ 复制到全部
+ 添加子卷
@@ -97,14 +99,8 @@
@@ -116,11 +112,7 @@
-
@@ -128,75 +120,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
+
-
+
吨
-
+
吨
-
-
+
+
-
+
@@ -214,10 +193,7 @@
-
+
@@ -299,16 +275,16 @@ export default {
const coilId = this.$route.query.coilId;
const actionId = this.$route.query.actionId;
const readonly = this.$route.query.readonly;
-
+
if (coilId) {
await this.loadMotherCoil(coilId);
}
-
+
// 保存待操作ID
if (actionId) {
this.actionId = actionId;
}
-
+
// 设置只读模式
if (readonly === 'true' || readonly === true) {
this.readonly = true;
@@ -319,7 +295,7 @@ export default {
handleMaterialTypeChange(item, index) {
// 清空物品选择
this.$set(item, 'itemId', null);
-
+
// 根据材料类型设置物品类型并恢复完整列表
if (item.materialType === '成品') {
this.$set(item, 'itemType', 'product');
@@ -331,7 +307,7 @@ export default {
this.rawMaterialList = [...this.allRawMaterials];
}
},
-
+
// 动态获取标签
getItemLabel(materialType) {
if (materialType === '成品') {
@@ -371,35 +347,35 @@ export default {
// 格式化物品名称(添加规格和参数信息)
formatItemName(item) {
if (!item) return '';
-
+
// 获取名称(原材料或产品)
const name = item.rawMaterialName || item.productName || '';
if (!name) return '';
-
+
let displayName = name;
const specs = [];
-
+
// 1. 优先显示规格(从对象的specification字段)
if (item.specification) {
specs.push(item.specification);
}
-
+
// 2. 添加参数参数(最多2个)
if (item.bomItems && item.bomItems.length > 0) {
const bomParams = item.bomItems
.filter(bomItem => bomItem.attrKey && bomItem.attrValue)
.slice(0, 2); // 最多2个参数参数
-
+
bomParams.forEach(param => {
specs.push(`${param.attrKey}:${param.attrValue}`);
});
}
-
+
// 3. 拼接成最终格式
if (specs.length > 0) {
displayName += `(${specs.join(' ')})`;
}
-
+
return displayName;
},
@@ -412,13 +388,13 @@ export default {
// 搜索子卷物品(前端过滤,支持名称和规格搜索)
async searchItemsForSplit(query, index) {
const item = this.splitList[index];
-
+
const itemType = item.itemType;
if (!itemType) {
this.$message.warning('请先选择材料类型');
return;
}
-
+
// 如果没有输入,恢复完整列表
if (!query || query.trim() === '') {
if (itemType === 'raw_material') {
@@ -428,10 +404,10 @@ export default {
}
return;
}
-
+
// 前端过滤:在已加载的数据中搜索
const searchQuery = query.toLowerCase().trim();
-
+
if (itemType === 'raw_material') {
// 从备份列表中过滤原材料
this.rawMaterialList = this.allRawMaterials.filter(item => {
@@ -440,11 +416,11 @@ export default {
// 搜索规格
const specMatch = item.specification && item.specification.toLowerCase().includes(searchQuery);
// 搜索 参数 参数
- const bomMatch = item.bomItems && item.bomItems.some(bom =>
+ const bomMatch = item.bomItems && item.bomItems.some(bom =>
(bom.attrKey && bom.attrKey.toLowerCase().includes(searchQuery)) ||
(bom.attrValue && bom.attrValue.toLowerCase().includes(searchQuery))
);
-
+
return nameMatch || specMatch || bomMatch;
});
} else if (itemType === 'product') {
@@ -455,11 +431,11 @@ export default {
// 搜索规格
const specMatch = item.specification && item.specification.toLowerCase().includes(searchQuery);
// 搜索 参数 参数
- const bomMatch = item.bomItems && item.bomItems.some(bom =>
+ const bomMatch = item.bomItems && item.bomItems.some(bom =>
(bom.attrKey && bom.attrKey.toLowerCase().includes(searchQuery)) ||
(bom.attrValue && bom.attrValue.toLowerCase().includes(searchQuery))
);
-
+
return nameMatch || specMatch || bomMatch;
});
}
@@ -493,12 +469,12 @@ export default {
if (!itemType) {
return;
}
-
+
try {
this.itemSearchLoading = true;
if (itemType === 'raw_material') {
- const response = await listRawMaterial({
- pageNum: 1,
+ const response = await listRawMaterial({
+ pageNum: 1,
pageSize: 100,
withBom: true
});
@@ -506,8 +482,8 @@ export default {
this.rawMaterialList = response.rows || [];
}
} else if (itemType === 'product') {
- const response = await listProduct({
- pageNum: 1,
+ const response = await listProduct({
+ pageNum: 1,
pageSize: 100,
withBom: true
});
@@ -661,11 +637,11 @@ export default {
}
}
- const loadingInstance = this.$loading({
- lock: true,
- text: '正在分条,请稍后...',
- background: 'rgba(0, 0, 0, 0.7)'
- })
+ const loadingInstance = this.$loading({
+ lock: true,
+ text: '正在分条,请稍后...',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
try {
this.loading = true;
@@ -694,12 +670,12 @@ export default {
const response = await splitMaterialCoil(splitData);
if (response.code === 200) {
this.$message.success('分条保存成功');
-
+
// 如果是从待操作列表进来的,标记操作为完成
if (this.actionId) {
await completeAction(this.actionId);
}
-
+
// 延迟返回,让用户看到成功提示
setTimeout(() => {
this.$router.back();
@@ -707,7 +683,7 @@ export default {
} else {
this.$message.error(response.msg || '分条保存失败');
}
-
+
} catch (error) {
this.$message.error('分条保存失败');
console.error(error);
@@ -1107,4 +1083,3 @@ export default {
}
}
-
diff --git a/klp-ui/src/views/wms/coil/typing.vue b/klp-ui/src/views/wms/coil/typing.vue
index b5c0266f..6cd1bbf8 100644
--- a/klp-ui/src/views/wms/coil/typing.vue
+++ b/klp-ui/src/views/wms/coil/typing.vue
@@ -94,12 +94,8 @@
-
+
@@ -107,19 +103,35 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -365,7 +377,7 @@ export default {
handleMaterialTypeChange(value) {
// 清空物品选择
this.$set(this.updateForm, 'itemId', null);
-
+
// 根据材料类型设置物品类型
if (value === '成品') {
this.$set(this.updateForm, 'itemType', 'product');
@@ -377,7 +389,7 @@ export default {
this.rawMaterialList = [...this.allRawMaterials];
}
},
-
+
// 加载钢卷信息
async loadCoilInfo(coilId) {
try {
@@ -451,35 +463,35 @@ export default {
// 格式化物品名称(添加规格和参数信息)
formatItemName(item) {
if (!item) return '';
-
+
// 获取名称(原材料或产品)
const name = item.rawMaterialName || item.productName || '';
if (!name) return '';
-
+
let displayName = name;
const specs = [];
-
+
// 1. 优先显示规格(从对象的specification字段)
if (item.specification) {
specs.push(item.specification);
}
-
+
// 2. 添加参数参数(最多2个)
if (item.bomItems && item.bomItems.length > 0) {
const bomParams = item.bomItems
.filter(bomItem => bomItem.attrKey && bomItem.attrValue)
.slice(0, 2); // 最多2个参数参数
-
+
bomParams.forEach(param => {
specs.push(`${param.attrKey}:${param.attrValue}`);
});
}
-
+
// 3. 拼接成最终格式
if (specs.length > 0) {
displayName += `(${specs.join(' ')})`;
}
-
+
return displayName;
},
@@ -523,13 +535,13 @@ export default {
if (!itemType) {
return;
}
-
+
try {
this.itemSearchLoading = true;
if (itemType === 'raw_material') {
// 使用带参数的接口
- const response = await listRawMaterial({
- pageNum: 1,
+ const response = await listRawMaterial({
+ pageNum: 1,
pageSize: 100,
withBom: true // 请求包含参数信息
});
@@ -538,8 +550,8 @@ export default {
}
} else if (itemType === 'product') {
// 使用带参数的接口
- const response = await listProduct({
- pageNum: 1,
+ const response = await listProduct({
+ pageNum: 1,
pageSize: 100,
withBom: true // 请求包含参数信息
});
@@ -560,7 +572,7 @@ export default {
this.$message.warning('请先选择材料类型');
return;
}
-
+
// 如果没有输入,恢复完整列表
if (!query || query.trim() === '') {
if (this.updateForm.itemType === 'raw_material') {
@@ -570,10 +582,10 @@ export default {
}
return;
}
-
+
// 前端过滤:在已加载的数据中搜索
const searchQuery = query.toLowerCase().trim();
-
+
if (this.updateForm.itemType === 'raw_material') {
// 从备份列表中过滤原材料
this.rawMaterialList = this.allRawMaterials.filter(item => {
@@ -582,11 +594,11 @@ export default {
// 搜索规格
const specMatch = item.specification && item.specification.toLowerCase().includes(searchQuery);
// 搜索 参数 参数
- const bomMatch = item.bomItems && item.bomItems.some(bom =>
+ const bomMatch = item.bomItems && item.bomItems.some(bom =>
(bom.attrKey && bom.attrKey.toLowerCase().includes(searchQuery)) ||
(bom.attrValue && bom.attrValue.toLowerCase().includes(searchQuery))
);
-
+
return nameMatch || specMatch || bomMatch;
});
} else if (this.updateForm.itemType === 'product') {
@@ -597,11 +609,11 @@ export default {
// 搜索规格
const specMatch = item.specification && item.specification.toLowerCase().includes(searchQuery);
// 搜索 参数 参数
- const bomMatch = item.bomItems && item.bomItems.some(bom =>
+ const bomMatch = item.bomItems && item.bomItems.some(bom =>
(bom.attrKey && bom.attrKey.toLowerCase().includes(searchQuery)) ||
(bom.attrValue && bom.attrValue.toLowerCase().includes(searchQuery))
);
-
+
return nameMatch || specMatch || bomMatch;
});
}
diff --git a/klp-ui/src/views/wms/print/index-auto.vue b/klp-ui/src/views/wms/print/index-auto.vue
index 2fa35a08..eaa81b20 100644
--- a/klp-ui/src/views/wms/print/index-auto.vue
+++ b/klp-ui/src/views/wms/print/index-auto.vue
@@ -39,7 +39,6 @@ import { listStockIo } from '@/api/wms/stockIo';
import { listStockIoDetail } from '@/api/wms/stockIoDetail';
import { listOrder } from '@/api/wms/order';
import { listOrderDetail } from '@/api/wms/orderDetail';
-import { listPurchasePlan } from '@/api/wms/purchasePlan';
import { mapState } from 'vuex';
import { ITEM_TYPE } from '../../../utils/enums';