From 8ed10ff020d5cdbc5daf7b56263b3298739c389c Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期四, 15 一月 2026 14:05:27 +0800
Subject: [PATCH] feat(inventory): 添加生产出入库功能模块
---
src/views/basicData/product/index.vue | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index 42cf147..da78f1e 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -284,14 +284,14 @@
speculativeTradingName: [],
},
modelRules: {
- model: [
- // { required: true, message: "璇疯緭鍏�", trigger: "blur" },
- {
- pattern: /^[0-9*]*$/,
- message: "鍙兘杈撳叆鏁板瓧鍜�*鍙�",
- trigger: "blur"
- }
- ],
+ // model: [
+ // // { required: true, message: "璇疯緭鍏�", trigger: "blur" },
+ // {
+ // pattern: /^[0-9*]*$/,
+ // message: "鍙兘杈撳叆鏁板瓧鍜�*鍙�",
+ // trigger: "blur"
+ // }
+ // ],
// unit: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
// speculativeTradingName: [{ required: false, message: "璇烽�夋嫨缁戝畾鏈哄櫒", trigger: "change" }],
},
@@ -408,16 +408,21 @@
proxy.$refs.modelFormRef.validate((valid) => {
if (valid) {
let _modelForm = { ...modelForm.value };
-
+
if(_modelForm.otherModel){
_modelForm.model = _modelForm.otherModel;
}
delete _modelForm.otherModel;
- // 灏嗛�変腑鐨勬満鍣ㄦ暟缁勮浆鎹负閫楀彿鍒嗛殧鐨勫瓧绗︿覆
+ // 纭繚 speculativeTradingName 鏄暟缁勭被鍨嬶紝鐒跺悗杞崲涓洪�楀彿鍒嗛殧鐨勫瓧绗︿覆
+ let speculativeTradingNameValue = modelForm.value.speculativeTradingName;
+ if (!Array.isArray(speculativeTradingNameValue)) {
+ // 濡傛灉涓嶆槸鏁扮粍锛岃浆鎹负鏁扮粍
+ speculativeTradingNameValue = speculativeTradingNameValue.split(',').filter(item => item);
+ }
const submitData = {
..._modelForm,
productId: currentId.value,
- speculativeTradingName: modelForm.value.speculativeTradingName.join(',')
+ speculativeTradingName: speculativeTradingNameValue.join(',')
};
addOrEditProductModel(submitData).then((res) => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
--
Gitblit v1.9.3