@@ -361,6 +408,7 @@ export default {
prop: "name",
type: "Input",
required: true,
+ maxlength: "30",
rules: {
required: true,
message: "请输入商品名称",
@@ -382,6 +430,7 @@ export default {
return (
@@ -412,7 +461,7 @@ export default {
return (
);
})}
@@ -490,7 +539,6 @@ export default {
const change = (e) => {
console.log(e);
this.modalData.productPlace = e.join("-");
- console.log(aa);
};
return (
{
console.log(res);
+ this.$emit("queryList");
+ this.toggle();
});
}
}, 300),
},
+ {
+ disabled: () => this.currentPanel != "其他信息",
+ label: "放入仓库",
+ type: "primary",
+ loading: this.isLoading,
+ submit: true,
+ handle: debounce(() => {
+ this.modalData.status = "DOWN";
+ this.$api.mer_admin.saveProduct(this.modalData).then((res) => {
+ console.log(res);
+ this.$emit("queryList");
+ this.toggle();
+ });
+ }, 300),
+ },
];
},
},
diff --git a/src/views/modules/product/popup/add-specifications.vue b/src/views/modules/product/popup/add-specifications.vue
index b2f451a..7e7df04 100644
--- a/src/views/modules/product/popup/add-specifications.vue
+++ b/src/views/modules/product/popup/add-specifications.vue
@@ -136,12 +136,22 @@ export default {
add: () => {
this.modalConfig.title = "属性";
this.$nextTick(() => {
+ // this.$refs.modal.resetFields();
this.modalData = {};
- this.$refs.modal.resetFields();
});
this.isAdd = true;
},
- update: () => {
+ update: (productAttributeList, productSpecificationList) => {
+ console.log(productAttributeList, productSpecificationList);
+ this.AttributeData = productAttributeList.map((item) => {
+ return {
+ attributeName: item.attributeName,
+ attributeValue: item.attributeValue.split(","),
+ id: item.id,
+ inputVisible: false,
+ };
+ });
+ this.tableData = productSpecificationList;
this.isAdd = false;
},
};
@@ -211,9 +221,9 @@ export default {
this.tableData = data.map((item) => {
return {
attributeValue: item,
- salePrice: "",
- costPrice: "",
- stockNum: "",
+ salePrice: 0,
+ costPrice: 0,
+ stockNum: 0,
};
});
console.log(data);
@@ -259,6 +269,7 @@ export default {
this.tableData.length <= 0,
// submit: true,
handle: () => {
let salePrice = ""; //价格范围