-
+
+
+
+
+
+
{{
@@ -293,7 +301,7 @@ export default {
if (valid) {
this.buttonLoading = true;
if (this.form.abnormalId != null) {
- updateCoilAbnormal(this.form).then(response => {
+ updateCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
@@ -301,7 +309,7 @@ export default {
this.buttonLoading = false;
});
} else {
- addCoilAbnormal(this.form).then(response => {
+ addCoilAbnormal({...this.form, length: this.form.endPosition - this.form.startPosition}).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
diff --git a/klp-ui/src/views/wms/coil/merge.vue b/klp-ui/src/views/wms/coil/merge.vue
index 31550619..61d9052b 100644
--- a/klp-ui/src/views/wms/coil/merge.vue
+++ b/klp-ui/src/views/wms/coil/merge.vue
@@ -215,6 +215,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -231,6 +246,7 @@ import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect
import RawMaterialSelector from "@/components/KLPService/RawMaterialSelect";
import ProductSelector from "@/components/KLPService/ProductSelect";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
+import TimeInput from "@/components/TimeInput";
import { generateCoilNoPrefix } from "@/utils/coil/coilNo";
export default {
@@ -240,7 +256,8 @@ export default {
ActualWarehouseSelect,
RawMaterialSelector,
ProductSelector,
- WarehouseSelect
+ WarehouseSelect,
+ TimeInput
},
dicts: ['coil_quality_status'],
data() {
@@ -270,6 +287,10 @@ export default {
coatingType: '',
actualLength: undefined,
actualWidth: undefined,
+ productionStartTime: '',
+ productionEndTime: '',
+ productionDuration: '',
+ formattedDuration: '',
},
rules: {
currentCoilNo: [
@@ -759,6 +780,49 @@ export default {
this.$router.back();
},
+ // 格式化毫秒值为xx天xx小时xx分钟
+ formatDuration(milliseconds) {
+ if (!milliseconds || milliseconds < 0) return '';
+
+ const seconds = Math.floor(milliseconds / 1000);
+ const minutes = Math.floor(seconds / 60);
+ const hours = Math.floor(minutes / 60);
+ const days = Math.floor(hours / 24);
+
+ const remainingHours = hours % 24;
+ const remainingMinutes = minutes % 60;
+
+ let result = '';
+ if (days > 0) result += `${days}天`;
+ if (remainingHours > 0) result += `${remainingHours}小时`;
+ if (remainingMinutes > 0) result += `${remainingMinutes}分钟`;
+
+ return result || '0分钟';
+ },
+ // 计算生产耗时
+ calculateProductionDuration() {
+ const { productionStartTime, productionEndTime } = this.targetCoil;
+ if (productionStartTime && productionEndTime) {
+ const start = new Date(productionStartTime).getTime();
+ const end = new Date(productionEndTime).getTime();
+ if (end < start) {
+ this.$message({
+ message: '结束时间不能早于开始时间',
+ type: 'error',
+ });
+ this.$set(this.targetCoil, 'productionDuration', '');
+ this.$set(this.targetCoil, 'formattedDuration', '');
+ } else {
+ const durationMs = end - start;
+ const durationMinutes = Math.round(durationMs / (1000 * 60));
+ this.$set(this.targetCoil, 'productionDuration', durationMinutes);
+ this.$set(this.targetCoil, 'formattedDuration', this.formatDuration(durationMinutes * 60 * 1000));
+ }
+ } else {
+ this.$set(this.targetCoil, 'productionDuration', '');
+ this.$set(this.targetCoil, 'formattedDuration', '');
+ }
+ },
// closePage 关闭当前页面
closePage() {
this.$router.back();
diff --git a/klp-ui/src/views/wms/coil/panels/LabelRender/MaterialTag.vue b/klp-ui/src/views/wms/coil/panels/LabelRender/MaterialTag.vue
index cbc2afd9..d7384576 100644
--- a/klp-ui/src/views/wms/coil/panels/LabelRender/MaterialTag.vue
+++ b/klp-ui/src/views/wms/coil/panels/LabelRender/MaterialTag.vue
@@ -54,12 +54,12 @@
- 实际库区
+ 厂家名称
-
+ {{ content.manufacturer || '' }}
+
+
+