Commit 5f0ec40b by 李伟康

fix: 修复可选链操作缺失导致的报错

1. 为CreateOrder.vue中的数组查找操作添加可选链,防止formList[2]不存在时调用find报错
2. 为EmployeeList.vue的列表容器添加底部内边距,优化布局展示
1 parent 442d95c8
...@@ -612,7 +612,7 @@ export default { ...@@ -612,7 +612,7 @@ export default {
this.changePayee() this.changePayee()
} else { } else {
// 防止从补录进来4s店收款为禁用 // 防止从补录进来4s店收款为禁用
const cell = this.formList[2].find(item => item.value == 'payeeType') const cell = this.formList[2]?.find(item => item.value == 'payeeType')
if (cell) { if (cell) {
// 编辑订单时,使用已有的payeeType值,新建订单时使用默认值1 // 编辑订单时,使用已有的payeeType值,新建订单时使用默认值1
if (!this.orderObj.id) { if (!this.orderObj.id) {
...@@ -629,7 +629,7 @@ export default { ...@@ -629,7 +629,7 @@ export default {
} }
// 设置订单类型表单显示(新建订单时) // 设置订单类型表单显示(新建订单时)
if (!this.orderObj.id && this.orderObj.djOrderType) { if (!this.orderObj.id && this.orderObj.djOrderType) {
const orderTypeCell = this.formList[2].find(item => item.value === 'djOrderType') const orderTypeCell = this.formList[2]?.find(item => item.value === 'djOrderType')
if (orderTypeCell) { if (orderTypeCell) {
orderTypeCell.current = this.orderObj.djOrderType orderTypeCell.current = this.orderObj.djOrderType
} }
......
...@@ -126,6 +126,7 @@ export default { ...@@ -126,6 +126,7 @@ export default {
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
gap: toRpx(32); gap: toRpx(32);
margin: 0 toRpx(48); margin: 0 toRpx(48);
padding-bottom: toRpx(2);
.item { .item {
justify-content: center; justify-content: center;
height: toRpx(72); height: toRpx(72);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!