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

View File

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