| | |
| | | const expandedKeys = ref([]); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "产品规格编号", |
| | | prop: "productCode", |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | prop: "model", |
| | | }, |
| | |
| | | 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("提交成功"); |