feat: 创建订单增加校验-客户必选、实付金额>0
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-03-27 15:39:43 +00:00
parent e681a4e99f
commit 3fd6023a93

View File

@@ -290,6 +290,18 @@ export default {
return return
} }
// 校验:客户必须选择
if (!this.selectedCustomer) {
uni.showToast({ title: '请选择客户', icon: 'none' })
return
}
// 校验实付金额必须大于0
if (this.actualAmount <= 0) {
uni.showToast({ title: '实付金额必须大于0', icon: 'none' })
return
}
const data = { const data = {
customerId: this.selectedCustomer ? this.selectedCustomer.customerId : null, customerId: this.selectedCustomer ? this.selectedCustomer.customerId : null,
items: this.orderItems.map(item => ({ items: this.orderItems.map(item => ({