From 421db078050588b0e93008ffe93c78025dc939db Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期六, 14 三月 2026 15:40:50 +0800
Subject: [PATCH] 生产订单和生产工单增加优先级,生产批号字段
---
src/views/productionManagement/productionOrder/New.vue | 40 +++++++++++++++++++
src/views/productionManagement/workOrder/index.vue | 22 +++++++++-
src/views/productionManagement/productionOrder/index.vue | 21 ++++++++++
3 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/New.vue b/src/views/productionManagement/productionOrder/New.vue
index c9c478b..3f8a2e5 100644
--- a/src/views/productionManagement/productionOrder/New.vue
+++ b/src/views/productionManagement/productionOrder/New.vue
@@ -48,6 +48,33 @@
:value="item.id" />
</el-select>
</el-form-item>
+ <el-form-item
+ label="鐢熶骇鎵瑰彿"
+ prop="lotNo"
+ >
+ <el-input v-model="formState.lotNo" placeholder="璇疯緭鍏ョ敓浜ф壒鍙�" />
+ </el-form-item>
+
+ <el-form-item
+ label="浼樺厛绾�"
+ prop="priority"
+ :rules="[
+ {
+ required: true,
+ message: '璇烽�夋嫨浼樺厛绾�',
+ trigger: 'change',
+ },
+ ]"
+ >
+ <el-select v-model="formState.priority" placeholder="璇烽�夋嫨浼樺厛绾�" style="width: 100%;" clearable>
+ <el-option
+ v-for="dict in priority_type"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
<el-form-item
label="闇�姹傛暟閲�"
@@ -55,6 +82,7 @@
>
<el-input-number v-model="formState.quantity" :step="1" :min="1" style="width: 100%" />
</el-form-item>
+
</el-form>
<!-- 浜у搧閫夋嫨寮圭獥 -->
@@ -101,7 +129,9 @@
productName: "",
productModelName: "",
unit: "",
+ priority: undefined,
quantity: 0,
+ lotNo: "",
});
const isShow = computed({
@@ -115,7 +145,12 @@
const showProductSelectDialog = ref(false);
-let { proxy } = getCurrentInstance()
+let { proxy } = getCurrentInstance();
+const { priority_type } = proxy.useDict("priority_type");
+
+if (priority_type.value && priority_type.value.length > 0) {
+ formState.value.priority = priority_type.value[2].value;
+}
const closeModal = () => {
// 閲嶇疆琛ㄥ崟鏁版嵁
@@ -125,7 +160,10 @@
routeId: undefined,
productName: "",
productModelName: "",
+ unit: "",
+ priority: priority_type.value && priority_type.value.length > 0 ? priority_type.value[2].value : undefined,
quantity: '',
+ lotNo: "",
};
isShow.value = false;
};
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 04f5a45..5db077d 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -1,3 +1,4 @@
+<!-- 鐢熶骇璁㈠崟 -->
<template>
<div class="app-container">
<div class="search_form">
@@ -114,12 +115,32 @@
const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
const { proxy } = getCurrentInstance();
+ const { priority_type } = proxy.useDict("priority_type");
const router = useRouter();
const isShowNewModal = ref(false);
const tableColumn = ref([
{
+ label: "浼樺厛绾�",
+ prop: "priority",
+ width: '100px',
+ dataType: "tag",
+ formatData: val => proxy.selectDictLabel(priority_type.value, val),
+ formatType: val => {
+ const v = Number(val);
+ if (v === 0) return "danger"; // 绾㈣壊
+ if (v === 1) return "warning"; // 榛勮壊
+ if (v === 2) return "success"; // 缁胯壊
+ return "";
+ },
+ },
+ {
+ label: "鐢熶骇鎵瑰彿",
+ prop: "lotNo",
+ width: '120px',
+ },
+ {
label: "鐢熶骇璁㈠崟鍙�",
prop: "npsNo",
width: '120px',
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 59457e8..5b878d3 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -1,3 +1,4 @@
+// 鐢熶骇宸ュ崟
<template>
<div class="app-container">
<div class="search_form">
@@ -234,13 +235,28 @@
import { getCurrentInstance, reactive, toRefs } from "vue";
import FilesDia from "./components/filesDia.vue";
const { proxy } = getCurrentInstance();
+ const { priority_type } = proxy.useDict("priority_type");
const tableColumn = ref([
{
- label: "宸ュ崟绫诲瀷",
- prop: "workOrderType",
- width: "80",
+ label: "浼樺厛绾�",
+ prop: "priority",
+ width: '100px',
+ dataType: "tag",
+ formatData: val => proxy.selectDictLabel(priority_type.value, val),
+ formatType: val => {
+ const v = Number(val);
+ if (v === 0) return "danger"; // 绾㈣壊
+ if (v === 1) return "warning"; // 榛勮壊
+ if (v === 2) return "success"; // 缁胯壊
+ return "";
+ },
},
+ // {
+ // label: "宸ュ崟绫诲瀷",
+ // prop: "workOrderType",
+ // width: "80",
+ // },
{
label: "宸ュ崟缂栧彿",
prop: "workOrderNo",
--
Gitblit v1.9.3