|
@@ -1260,6 +1260,18 @@ export default {
|
|
|
onChildProdChange(index = null, type = "view") {
|
|
|
this.modalType = type;
|
|
|
|
|
|
+ if (type === "add") {
|
|
|
+ if (this.editIndex !== -1) {
|
|
|
+ this.$message.warning("当前有正在编辑的子商品,请先保存");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.childTableData.length === 10) {
|
|
|
+ this.$message.warning("子商品最多不能超过十条");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (type === "view" && index !== null) {
|
|
|
this.editItem = { ...this.childTableData[index] };
|
|
|
} else {
|