- 只能上传jpg/png文件,且不超过500kb
+
+
+
+ 点击上传
+
+
+ 只能上传jpg/png文件,且不超过500kb
+
+
+
+
-
+
);
},
},
{
label: "联系电话(仅用户可见)",
- prop: "limit",
+ prop: "contactPhone",
type: "Input",
width: "300px",
rules: { required: true, message: "请输入联系电话" },
@@ -254,7 +291,19 @@ export default {
type: "primary",
loading: this.isLoading,
submit: true,
- handle: () => {},
+ handle: () => {
+ console.log(this.modalData);
+ this.$api.mer_admin
+ .editBrandInfo(this.modalData)
+ .then((res) => {
+ console.log(res);
+ this.toggle();
+ this.$emit("getList");
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ },
},
];
},
diff --git a/src/views/modules/brand/config/popup/change-password.vue b/src/views/modules/brand/config/popup/change-password.vue
index 85fb772..ae3d873 100644
--- a/src/views/modules/brand/config/popup/change-password.vue
+++ b/src/views/modules/brand/config/popup/change-password.vue
@@ -30,6 +30,8 @@ export default {
ProductData: {},
fileList: [],
isAdd: "",
+ totalTime: 60,
+ content: "获取验证码",
};
},
methods: {
@@ -63,10 +65,10 @@ export default {
return [
{
label: "密码",
- prop: "discount",
+ prop: "password",
type: "Input",
width: "300px",
- rules: { required: true, message: "请输入旧密码" },
+ rules: { required: true, message: "请输入密码" },
},
{
label: "管理员账号",
@@ -76,15 +78,39 @@ export default {
rules: { required: true, message: "请输入管理员账号" },
type: "jsx",
render: () => {
+ let getCode = () => {
+ console.log("123");
+ if (this.totalTime == 0) {
+ this.content = "获取验证码";
+ this.totalTime = 60;
+ return;
+ }
+ this.content = this.totalTime + "秒后重新获取";
+ this.totalTime--;
+ setTimeout(getCode, 1000);
+ };
return (
-
-
- 获取验证码
-
-
-
-
+
+
+
+ {this.content}
+
+
+
+
+
);
},
@@ -129,7 +155,15 @@ export default {
type: "primary",
loading: this.isLoading,
submit: true,
- handle: () => {},
+ handle: () => {
+ if (this.isAdd) {
+ console.log(this.modalData);
+ } else {
+ this.$api.mer_admin.changePassword(this.modalData).then((res) => {
+ console.log(res);
+ });
+ }
+ },
},
];
},
diff --git a/src/views/modules/product/index.vue b/src/views/modules/product/index.vue
index f143f17..691a08d 100644
--- a/src/views/modules/product/index.vue
+++ b/src/views/modules/product/index.vue
@@ -31,11 +31,11 @@
placeholder="商品搜索"
>
-
+
-
-
+
+
{
return {
@@ -307,8 +315,6 @@ export default {
});
this.$set(this.modalData, "productSpecificationList", tableData);
this.$set(this.modalData, "productAttributeList", AttributeList);
- this.$set(this.modalData, "singlePrice", salePrice);
- this.$set(this.modalData, "singleStock", stockNum);
},
addAttribute() {
if (this.isAdd) {
@@ -549,12 +555,6 @@ export default {
{
label: "规格",
prop: "productSpecificationList",
- // required: true,
- // rules: {
- // required: true,
- // message: "请选择销售单位",
- // trigger: "blur",
- // },
type: "jsx",
render: () => {
return (
@@ -598,14 +598,14 @@ export default {
},
{
label: "库存",
- prop: "singleStock",
+ prop: "stockNum",
type: "jsx",
render: () => {
return (
);
},
@@ -838,11 +838,10 @@ export default {
{
attributeValue: "默认",
costPrice: this.modalData.costPrice,
- salePrice: this.modalData.singlePrice,
- stockNum: this.modalData.singleStock,
+ marketPrice: this.modalData.marketPrice,
+ stockNum: this.modalData.stockNum,
weight: this.modalData.weight,
volume: this.modalData.volume,
- marketPrice: this.modalData.marketPrice,
},
];
}
@@ -873,8 +872,8 @@ export default {
{
attributeValue: "默认",
costPrice: this.modalData.costPrice,
- salePrice: this.modalData.singlePrice,
- stockNum: this.modalData.singleStock,
+ marketPrice: this.modalData.marketPrice,
+ stockNum: this.modalData.stockNum,
weight: this.modalData.weight,
volume: this.modalData.volume,
},
diff --git a/src/views/modules/product/popup/add-specifications.vue b/src/views/modules/product/popup/add-specifications.vue
index 8269722..08caa1f 100644
--- a/src/views/modules/product/popup/add-specifications.vue
+++ b/src/views/modules/product/popup/add-specifications.vue
@@ -287,25 +287,6 @@ export default {
align: "center",
"min-width": "160px",
},
- {
- title: "价格(元)",
- field: "salePrice",
- align: "center",
- "min-width": "160px",
- type: "jsx",
- render: ({ row }) => {
- return (
-
-
-
- );
- },
- },
{
title: "成本(元)",
field: "costPrice",
@@ -317,7 +298,6 @@ export default {
this.tableData.length <= 0,
// submit: true,
handle: () => {
- let volume = ""; //重量
- let weight = ""; //体积
- let salePrice = ""; //价格范围
- let stockNum = ""; //库存范围
- let minSalePrice = Math.min.apply(
- Math,
- this.tableData.map((item) => {
- return item.salePrice;
- })
- );
- let maxSalePrice = Math.max.apply(
- Math,
- this.tableData.map((item) => {
- return item.salePrice;
- })
- );
- let minStockNum = Math.min.apply(
- Math,
- this.tableData.map((item) => {
- return item.stockNum;
- })
- );
- let maxStockNum = Math.max.apply(
- Math,
- this.tableData.map((item) => {
- return item.stockNum;
- })
- );
- if (minSalePrice == maxSalePrice) {
- salePrice = maxSalePrice;
- } else {
- salePrice = minSalePrice + "~" + maxSalePrice;
- }
- if (minStockNum == maxStockNum) {
- stockNum = maxStockNum;
- } else {
- stockNum = minStockNum + "~" + maxStockNum;
- }
- console.log(this.tableData);
-
this.$emit(
"getSpecs",
this.tableData,
this.AttributeData,
- salePrice,
- stockNum
);
this.toggle();
},