Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq

This commit is contained in:
gyq
2024-10-15 09:03:06 +08:00
8 changed files with 176 additions and 62 deletions

View File

@@ -752,17 +752,21 @@ export default {
// 提交
submitHandle() {
console.log(this.form.skuList)
// 如果找到undefined立即停止搜索并返回true
const hasUndefined = this.form.skuList.some(obj => {
for (const key in obj) {
console.log(key, obj)
if (obj['salePrice'] === undefined || obj['memberPrice'] === undefined || obj['costPrice'] === undefined || obj['originPrice'] === undefined) {
return true; // 如果找到undefined立即停止搜索并返回true
if (this.shopTypesActive == 0) {//单规格判断
if (obj['salePrice'] == undefined || obj['memberPrice'] == undefined) {
return true;
}
} else {//多规格判断
if (obj['salePrice'] == undefined || obj['memberPrice'] == undefined || obj['costPrice'] == undefined || obj['originPrice'] == undefined) {
return true;
}
}
}
return false; // 如果没有找到undefined返回false
return false;
});
// 停止执行下面的数据
if (hasUndefined) {
this.$message({
message: "请完善规格属性的参数!",
@@ -770,6 +774,7 @@ export default {
});
return false;
}
let arr = [];
this.imgList.forEach((ele) => {
arr.push(ele.url);

View File

@@ -50,7 +50,12 @@
</div>
<div class="head-container">
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper" @size-change="(e) => {
tableData.size = e;
tableData.page = 0;
getTableData();
}
"></el-pagination>
</div>
</div>
</template>