add
This commit is contained in:
parent
b691702778
commit
7375f33dcf
|
@ -118,13 +118,6 @@ export default {
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
<span> 提示: 请输入≤9.9数字 如:8折=售价*0.8</span>
|
<span> 提示: 请输入≤9.9数字 如:8折=售价*0.8</span>
|
||||||
</div>
|
</div>
|
||||||
// <el-input
|
|
||||||
// type="number"
|
|
||||||
// min={0}
|
|
||||||
// max={9.9}
|
|
||||||
// v-model={this.modalData.discount}
|
|
||||||
// placeholder="请输入≤9.9数字 如:8折=售价*0.8"
|
|
||||||
// ></el-input>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -133,7 +126,7 @@ export default {
|
||||||
prop: "limitCount",
|
prop: "limitCount",
|
||||||
type: "Input",
|
type: "Input",
|
||||||
width: "300px",
|
width: "300px",
|
||||||
// rules: { required: true, message: "请输入价格" },
|
rules: { required: true, message: "请输入价格" },
|
||||||
type: "jsx",
|
type: "jsx",
|
||||||
render: () => {
|
render: () => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -288,6 +288,8 @@ export default {
|
||||||
},
|
},
|
||||||
//获取属性
|
//获取属性
|
||||||
getSpecs(tableData, AttributeData, salePrice, stockNum) {
|
getSpecs(tableData, AttributeData, salePrice, stockNum) {
|
||||||
|
console.log(tableData);
|
||||||
|
|
||||||
this.modalData.specType = 1;
|
this.modalData.specType = 1;
|
||||||
let AttributeList = AttributeData.map((item) => {
|
let AttributeList = AttributeData.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -189,6 +189,7 @@ export default {
|
||||||
this.AttributeData[index].attributeValue.indexOf(tag),
|
this.AttributeData[index].attributeValue.indexOf(tag),
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
this.calculation();
|
||||||
},
|
},
|
||||||
//聚焦
|
//聚焦
|
||||||
showInput(index) {
|
showInput(index) {
|
||||||
|
@ -230,13 +231,31 @@ export default {
|
||||||
for (let i = 0; i < this.AttributeData.length; i++) {
|
for (let i = 0; i < this.AttributeData.length; i++) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
data = this.AttributeData[i].attributeValue.map((item) => {
|
data = this.AttributeData[i].attributeValue.map((item) => {
|
||||||
return this.AttributeData[i].attributeName + item;
|
return {
|
||||||
|
attributeList: [
|
||||||
|
{
|
||||||
|
attributeName: this.AttributeData[i].attributeName,
|
||||||
|
attributeValue: item,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
name: item,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
data.forEach((it) => {
|
data.forEach((it) => {
|
||||||
this.AttributeData[i].attributeValue.forEach((e) => {
|
this.AttributeData[i].attributeValue.forEach((e) => {
|
||||||
let name = this.AttributeData[i].attributeName;
|
console.log(it.attributeList);
|
||||||
list.push(it + "/" + name + e);
|
let attributeList = JSON.parse(JSON.stringify(it.attributeList));
|
||||||
|
attributeList.push({
|
||||||
|
attributeName: this.AttributeData[i].attributeName,
|
||||||
|
attributeValue: e,
|
||||||
|
});
|
||||||
|
list.push({
|
||||||
|
attributeList,
|
||||||
|
name: it.name + e,
|
||||||
|
});
|
||||||
|
console.log(list);
|
||||||
|
// list.push(it + e);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
data = list;
|
data = list;
|
||||||
|
@ -245,7 +264,8 @@ export default {
|
||||||
}
|
}
|
||||||
this.tableData = data.map((item) => {
|
this.tableData = data.map((item) => {
|
||||||
return {
|
return {
|
||||||
attributeValue: item,
|
attributeList: item.attributeList,
|
||||||
|
attributeValue: item.name,
|
||||||
salePrice: 0,
|
salePrice: 0,
|
||||||
costPrice: 0,
|
costPrice: 0,
|
||||||
stockNum: 0,
|
stockNum: 0,
|
||||||
|
@ -398,8 +418,8 @@ export default {
|
||||||
disabled: () => this.tableData.length <= 0,
|
disabled: () => this.tableData.length <= 0,
|
||||||
// submit: true,
|
// submit: true,
|
||||||
handle: () => {
|
handle: () => {
|
||||||
let volume = "" //重量
|
let volume = ""; //重量
|
||||||
let weight = "" //体积
|
let weight = ""; //体积
|
||||||
let salePrice = ""; //价格范围
|
let salePrice = ""; //价格范围
|
||||||
let stockNum = ""; //库存范围
|
let stockNum = ""; //库存范围
|
||||||
let minSalePrice = Math.min.apply(
|
let minSalePrice = Math.min.apply(
|
||||||
|
|
Loading…
Reference in New Issue