This commit is contained in:
余同学 2024-09-01 17:33:10 +08:00
parent b691702778
commit 7375f33dcf
3 changed files with 29 additions and 14 deletions

View File

@ -118,13 +118,6 @@ export default {
></el-input-number>
<span> 提示 请输入9.9数字 :8=售价*0.8</span>
</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",
type: "Input",
width: "300px",
// rules: { required: true, message: "" },
rules: { required: true, message: "请输入价格" },
type: "jsx",
render: () => {
return (

View File

@ -288,6 +288,8 @@ export default {
},
//
getSpecs(tableData, AttributeData, salePrice, stockNum) {
console.log(tableData);
this.modalData.specType = 1;
let AttributeList = AttributeData.map((item) => {
return {

View File

@ -189,6 +189,7 @@ export default {
this.AttributeData[index].attributeValue.indexOf(tag),
1
);
this.calculation();
},
//
showInput(index) {
@ -230,13 +231,31 @@ export default {
for (let i = 0; i < this.AttributeData.length; i++) {
if (i == 0) {
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 {
data.forEach((it) => {
this.AttributeData[i].attributeValue.forEach((e) => {
let name = this.AttributeData[i].attributeName;
list.push(it + "/" + name + e);
console.log(it.attributeList);
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;
@ -245,7 +264,8 @@ export default {
}
this.tableData = data.map((item) => {
return {
attributeValue: item,
attributeList: item.attributeList,
attributeValue: item.name,
salePrice: 0,
costPrice: 0,
stockNum: 0,
@ -398,8 +418,8 @@ export default {
disabled: () => this.tableData.length <= 0,
// submit: true,
handle: () => {
let volume = "" //
let weight = "" //
let volume = ""; //
let weight = ""; //
let salePrice = ""; //
let stockNum = ""; //
let minSalePrice = Math.min.apply(