diff --git a/src/views/repair/tickets/form/UserAndCarForm.vue b/src/views/repair/tickets/form/UserAndCarForm.vue index 462eb26..22f092a 100644 --- a/src/views/repair/tickets/form/UserAndCarForm.vue +++ b/src/views/repair/tickets/form/UserAndCarForm.vue @@ -362,7 +362,10 @@ export default { this.buttonLoading = true try{ const data = this.formData.carInfo; - debugger + const brand = data.brandAndModel + if (typeof brand === 'string'){ + data.brandAndModel = [brand, data?.carModel] + } const res = await CarMainApi.compute(data); const result = res.data; this.formData.carInfo.insuranceExpiryDate = result.insuranceExpiryDate @@ -376,7 +379,10 @@ export default { async submitForm(){ await this.$refs["formRef"].validate(); this.formLoading = true - this.formData.carInfo.brandAndModel = [this.formData.carInfo.brandAndModel, this.formData.carInfo.carModel] + const brand = this.formData.carInfo.brandAndModel + if (typeof brand === 'string'){ + this.formData.carInfo.brandAndModel = [brand, this.formData.carInfo?.carModel] + } try { await updateCustomerAndCar(this.formData) this.$modal.msgSuccess(this.formData?.userInfo?.id ? "修改成功" : "新增成功")