feat(调拨单): 新增调拨单管理功能

- 新增调拨单主表和明细表相关API接口
- 新增调拨单主表和明细表前端页面
- 新增钢卷选择器组件和调拨明细表格组件
- 修改产品信息和原料信息渲染组件支持更多字段
- 修改产品选择和原料选择组件支持数值类型值
- 修改钢卷号渲染组件支持更多字段和外部数据
- 新增调拨单匹配物料接口
This commit is contained in:
砂糖
2026-03-28 14:08:27 +08:00
parent 00939dae2f
commit 499654907b
13 changed files with 2520 additions and 33 deletions

View File

@@ -153,7 +153,7 @@ export default {
},
props: {
value: {
type: String,
type: [String, Number],
default: ''
},
readonly: {
@@ -224,7 +224,7 @@ export default {
this.selectedId = val || '';
if (this.selectedId) {
const res = await getProduct(this.selectedId);
if (res.code === 200) this.selectedRow = res.data;
if (res.code === 200 && res.data != null) this.selectedRow = res.data || {};
} else {
this.selectedRow = {};
}
@@ -233,6 +233,7 @@ export default {
dialogVisible(val) {
if (val) {
this.getList();
this.listRecentlySelected();
}
}
},
@@ -408,10 +409,10 @@ export default {
this.resetForm("form");
},
},
mounted() {
this.listRecentlySelected();
this.getList();
},
// mounted() {
// this.getList();
// },
};
</script>

View File

@@ -139,7 +139,7 @@ export default {
props: {
// 绑定值原材料ID 单选字符串格式
value: {
type: String,
type: [String, Number],
default: ''
},
// 是否只读
@@ -222,7 +222,7 @@ export default {
// 有选中ID则获取详情赋值
if (this.selectedId) {
const res = await getRawMaterial(this.selectedId);
if (res.code === 200) this.selectedRow = res.data;
if (res.code === 200) this.selectedRow = res.data || {};
} else {
this.selectedRow = {};
}
@@ -231,6 +231,7 @@ export default {
// 弹窗打开时加载数据
dialogVisible(val) {
if (val) {
this.listRecentlySelected();
this.getList();
}
}
@@ -417,10 +418,10 @@ export default {
this.dialogVisible = false;
}
},
mounted() {
this.listRecentlySelected();
this.getList();
}
// mounted() {
// this.listRecentlySelected();
// this.getList();
// }
};
</script>

View File

@@ -2,7 +2,7 @@
<div :class="{'g-coil-no': isGCoilNo}">
<!-- 有coilId时显示popover无则只显示标签 -->
<el-popover
v-if="coilId"
v-if="coilId && coil.enterCoilNo"
placement="left"
width="200"
trigger="hover"
@@ -73,6 +73,10 @@ export default {
type: String,
default: ''
},
coil: {
type: Object,
default: () => {}
}
},
data() { // 修正data应该是函数
return {
@@ -84,37 +88,37 @@ export default {
return this.coilNo && this.coilNo.startsWith('G');
},
specification() {
return this.coilInfo.specification || '-'
return this.coilInfo.specification || this.coil?.specification || '-'
},
itemName() {
return this.coilInfo.itemName || '-'
return this.coilInfo.itemName || this.coil?.itemName || '-'
},
material() {
return this.coilInfo.material || '-'
return this.coilInfo.material || this.coil?.material || '-'
},
manufacturer() {
return this.coilInfo.manufacturer || '-'
return this.coilInfo.manufacturer || this.coil?.manufacturer || '-'
},
currentCoilNo() {
return this.coilNo || this.coilInfo?.currentCoilNo || '-'
return this.coilNo || this.coil?.currentCoilNo || '-'
},
netWeight() {
return this.coilInfo.netWeight || '-'
return this.coilInfo.netWeight || this.coil?.netWeight || '-'
},
supplierCoilNo() {
return this.coilInfo.supplierCoilNo || '-'
return this.coilInfo.supplierCoilNo || this.coil?.supplierCoilNo || '-'
},
length() {
return this.coilInfo.length || '-'
return this.coilInfo.length || this.coil?.length || '-'
},
actualLength() {
return this.coilInfo.actualLength || '-'
return this.coilInfo.actualLength || this.coil?.actualLength || '-'
},
actualWidth() {
return this.coilInfo.actualWidth || '-'
return this.coilInfo.actualWidth || this.coil?.actualWidth || '-'
},
actualThickness() {
return this.coilInfo.actualThickness || '-'
return this.coilInfo.actualThickness || this.coil?.actualThickness || '-'
},
},
methods: {
@@ -140,7 +144,7 @@ export default {
if (newVal) {
this.getCoilInfo();
} else {
this.coilInfo = {};
this.coilInfo = this.coil || {};
}
}
}

View File

@@ -64,8 +64,8 @@ export default {
return {};
}
return {
productId: this.product.itemId || '',
productName: this.product.itemName || '',
productId: this.product.itemId || this.product.productId || '',
productName: this.product.itemName || this.product.productName || '',
// productCode: this.product.productCode || '',
specification: this.product.specification || '',
material: this.product.material || '',

View File

@@ -51,8 +51,8 @@ export default {
return {};
}
return {
rawMaterialId: this.material.itemId || '',
rawMaterialName: this.material.itemName || '',
rawMaterialId: this.material.itemId || this.material.rawMaterialId || '',
rawMaterialName: this.material.itemName || this.material.rawMaterialName || '',
// rawMaterialCode: this.material.rawMaterialCode || '',
specification: this.material.specification || '',
material: this.material.material || '',

View File

@@ -1,7 +1,7 @@
<template>
<el-autocomplete class="inline-input" v-model="inputValue" :fetch-suggestions="querySearch" :placeholder="placeholder"
:trigger-on-focus="triggerMode === 'focus'" @select="handleSelect" @change="handleInputChange"
clearable></el-autocomplete>
clearable :disabled="disabled"></el-autocomplete>
</template>
<script>
@@ -53,6 +53,11 @@ export default {
type: String,
default: 'focus',
validator: (value) => ['focus', 'input'].includes(value)
},
// 是否禁用输入框默认false
disabled: {
type: Boolean,
default: false
}
},
data() {