From fe15fd5caffbe7ed09256d4f1f8a633c16419921 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期四, 07 五月 2026 13:12:45 +0800
Subject: [PATCH] 产品管理: 在新增生产订单表单中添加业务员和备注字段,并在表格中显示相应列
---
src/views/productionManagement/productionOrder/New.vue | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/New.vue b/src/views/productionManagement/productionOrder/New.vue
index c9c478b..7a07782 100644
--- a/src/views/productionManagement/productionOrder/New.vue
+++ b/src/views/productionManagement/productionOrder/New.vue
@@ -50,11 +50,35 @@
</el-form-item>
<el-form-item
+ label="涓氬姟鍛�"
+ prop="entryPerson"
+ :rules="[{ required: true, message: '璇烽�夋嫨涓氬姟鍛�', trigger: 'change' }]"
+ >
+ <el-select
+ v-model="formState.entryPerson"
+ filterable
+ clearable
+ placeholder="璇烽�夋嫨涓氬姟鍛�"
+ style="width: 100%;"
+ >
+ <el-option
+ v-for="item in userList"
+ :key="item.userId"
+ :label="item.nickName"
+ :value="item.nickName"
+ />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item
label="闇�姹傛暟閲�"
prop="quantity"
>
<el-input-number v-model="formState.quantity" :step="1" :min="1" style="width: 100%" />
</el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input v-model="formState.remark" type="textarea" :rows="4" maxlength="500" show-word-limit placeholder="璇疯緭鍏�" />
+ </el-form-item>
</el-form>
<!-- 浜у搧閫夋嫨寮圭獥 -->
@@ -74,9 +98,11 @@
</template>
<script setup>
-import {ref, computed, getCurrentInstance} from "vue";
+import {ref, computed, getCurrentInstance, onMounted} from "vue";
import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
import {addProductOrder, listProcessRoute} from "@/api/productionManagement/productionOrder.js";
+import {userListNoPage} from "@/api/system/user.js";
+import useUserStore from "@/store/modules/user";
const props = defineProps({
visible: {
@@ -94,6 +120,9 @@
const emit = defineEmits(['update:visible', 'completed']);
// 鍝嶅簲寮忔暟鎹紙鏇夸唬閫夐」寮忕殑 data锛�
+const userStore = useUserStore();
+const userList = ref([]);
+
const formState = ref({
productId: undefined,
productModelId: undefined,
@@ -102,6 +131,8 @@
productModelName: "",
unit: "",
quantity: 0,
+ remark: "",
+ entryPerson: userStore.nickName || "",
});
const isShow = computed({
@@ -118,18 +149,26 @@
let { proxy } = getCurrentInstance()
const closeModal = () => {
- // 閲嶇疆琛ㄥ崟鏁版嵁
formState.value = {
productId: undefined,
productModelId: undefined,
routeId: undefined,
productName: "",
productModelName: "",
- quantity: '',
+ unit: "",
+ quantity: 0,
+ remark: "",
+ entryPerson: userStore.nickName || "",
};
isShow.value = false;
};
+onMounted(() => {
+ userListNoPage().then((res) => {
+ userList.value = res.data || [];
+ });
+});
+
// 浜у搧閫夋嫨澶勭悊
const handleProductSelect = async (products) => {
if (products && products.length > 0) {
--
Gitblit v1.9.3