This commit is contained in:
2024-09-04 17:22:56 +08:00

View File

@@ -234,7 +234,7 @@
></el-input-number>
</template>
</el-table-column>
<el-table-column label="成本价" prop="costPrice">
<!-- <el-table-column label="成本价" prop="costPrice">
<template v-slot="scope">
<el-input-number
@change="priceFormat(scope.row, 'costPrice')"
@@ -243,7 +243,7 @@
controls-position="right"
></el-input-number>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="原价" prop="originPrice">
<template v-slot="scope">
<el-input-number
@@ -253,7 +253,7 @@
controls-position="right"
></el-input-number>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column label="起售数量" prop="suit">
<template slot-scope="scope">
<el-input-number
@@ -1011,8 +1011,7 @@ export default {
// 提交
submitHandle() {
console.log(this.form.skuList);
const hasUndefined = this.form.skuList.some((obj) => {
const hasUndefined = this.form.skuList.some(obj => {
for (const key in obj) {
if (obj[key] === undefined) {
return true; // 如果找到undefined立即停止搜索并返回true
@@ -1043,6 +1042,8 @@ export default {
this.form.selectSpec = JSON.stringify(this.selectSpec);
this.form.specTableHeaders = JSON.stringify(this.specTableHeaders);
this.form.specInfo = JSON.stringify(this.form.skuList);
this.form.skuList[0].costPrice = 0
this.form.skuList[0].originPrice = this.form.skuList[0].salePrice
if (this.form.id) {
await tbProductPut(this.form);
} else {