更新
This commit is contained in:
parent
a841f6038d
commit
c23ddf0f15
|
@ -344,18 +344,30 @@ export default {
|
|||
this.$refs.table.toggleRowExpansion(row);
|
||||
},
|
||||
handlePriceChange(row, val) {
|
||||
row.priceSubName = val?.subName;
|
||||
row.priceSpec = val?.spec;
|
||||
row.pricePrice = val?.price;
|
||||
row.priceUnit = val?.unit;
|
||||
row.priceClassify = val?.classify;
|
||||
row.priceQuantityNumerator = val?.quantityNumerator;
|
||||
row.priceQuantityDenominator = val?.quantityDenominator;
|
||||
row.priceCode = val?.code;
|
||||
row.priceStatus = val?.status;
|
||||
// 先判断val是否为空,避免后续重复判断
|
||||
if (val == null) {
|
||||
row.priceSubName = null;
|
||||
row.priceSpec = null;
|
||||
row.pricePrice = null;
|
||||
row.priceUnit = null;
|
||||
row.priceClassify = null;
|
||||
row.priceQuantityNumerator = null;
|
||||
row.priceQuantityDenominator = null;
|
||||
row.priceCode = null;
|
||||
row.priceStatus = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// val不为空时赋值
|
||||
row.priceSubName = val.subName || null;
|
||||
row.priceSpec = val.spec || null;
|
||||
row.pricePrice = val.price || null;
|
||||
row.priceUnit = val.unit || null;
|
||||
row.priceClassify = val.classify || null;
|
||||
row.priceQuantityNumerator = val.quantityNumerator || null;
|
||||
row.priceQuantityDenominator = val.quantityDenominator || null;
|
||||
row.priceCode = val.code || null;
|
||||
row.priceStatus = val.status || null;
|
||||
row.priceCategory = val.category;
|
||||
row.priceSize = val.size;
|
||||
row.priceName = val.name;
|
||||
|
@ -490,6 +502,8 @@ export default {
|
|||
// 如果当前在最后一页,调用getList刷新数据
|
||||
if (Math.ceil(this.total / this.pageSize) === this.pageNum) {
|
||||
this.getList();
|
||||
} else {
|
||||
this.total += (value * this.rows.length);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -590,6 +604,7 @@ export default {
|
|||
upItem.sort = current.sort;
|
||||
current.sort = temp;
|
||||
this.reorder();
|
||||
this.getList();
|
||||
},
|
||||
// 获取最新的排序
|
||||
getNewSort() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user