| | |
| | | <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="openname"> |
| | | 姓名 |
| | | </span> |
| | | <el-input v-model="form.cusName" placeholder="请输入姓名" :disabled="isDisabled" /> |
| | | <el-input v-model="form.cusName" placeholder="请输入姓名" :disabled="isDisabled" @input="form.cusName = $event.replace(/\s/g, '')" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="证件类型" prop="idType"> |
| | |
| | | <span slot="label" style="display: inline-block; border-bottom: 2px solid blue" @click="handleQuery"> |
| | | 证件号码 |
| | | </span> |
| | | <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="请输入身份证号" @input="inputChange" /> |
| | | <el-input :disabled="isDisabled" v-model="form.cusIdcard" placeholder="请输入身份证号" @input="handleIdCardInput"/> |
| | | <!-- <i style=" |
| | | font-size: 1rem; |
| | | position: absolute; |
| | |
| | | trigger: 'blur', |
| | | }, |
| | | ]"> |
| | | <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" /> |
| | | <el-input v-model="form.cusPhone" placeholder="请输入联系电话" :disabled="isDisabled" @input="form.cusPhone = $event.replace(/\s/g, '')"/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="出生日期" prop="cusBrithday"> |
| | |
| | | this.marryall = 0; |
| | | }, |
| | | methods: { |
| | | handleIdCardInput(value) { |
| | | this.form.cusIdcard = value.replace(/\s/g, ''); |
| | | this.inputChange(); // 保留原有的身份证输入处理逻辑 |
| | | }, |
| | | debounceNumberChange(currentValue, oldValue) { |
| | | clearTimeout(this.debounceTimer); |
| | | this.debounceTimer = setTimeout(() => { |
| | |
| | | }); |
| | | }, |
| | | /** 登记提交按钮 */ |
| | | /** 登记提交按钮 */ |
| | | submitForm() { |
| | | let _this = this; |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | // return; |
| | | if (this.form.cusSex === "女") { |
| | | this.form.cusSex = 1; |
| | | // 创建表单数据的副本并去除空格 |
| | | const formData = { ...this.form }; |
| | | formData.cusName = formData.cusName ? formData.cusName.replace(/\s/g, '') : ''; |
| | | formData.cusPhone = formData.cusPhone ? formData.cusPhone.replace(/\s/g, '') : ''; |
| | | formData.cusIdcard = formData.cusIdcard ? formData.cusIdcard.replace(/\s/g, '') : ''; |
| | | |
| | | // 处理性别值 |
| | | if (formData.cusSex === "女") { |
| | | formData.cusSex = 1; |
| | | } |
| | | if (this.form.cusSex === "男") { |
| | | this.form.cusSex = 0; |
| | | if (formData.cusSex === "男") { |
| | | formData.cusSex = 0; |
| | | } |
| | | if (this.form.cusSex === "未知") { |
| | | this.form.cusSex = 2; |
| | | if (formData.cusSex === "未知") { |
| | | formData.cusSex = 2; |
| | | } |
| | | if (this.form.tjType === "") { |
| | | this.form.tjType = this.dict.type.dict_team[0].value; |
| | | if (formData.tjType === "") { |
| | | formData.tjType = this.dict.type.dict_team[0].value; |
| | | } |
| | | |
| | | addCustomer(this.form).then((response) => { |
| | | addCustomer(formData).then((response) => { |
| | | this.responseList = response.data; |
| | | |
| | | this.$modal.msgSuccess("新增成功"); |
| | | |
| | | _this.tcShow = true; |
| | | _this.isDisabled = true; |
| | | _this.top = false; |
| | |
| | | if (this.tableData[0]) { |
| | | var pacId = this.tableData[0].pacId; |
| | | } |
| | | |
| | | // 去空格处理 |
| | | const processedForm = { |
| | | ...this.form, |
| | | cusName: this.form.cusName ? this.form.cusName.replace(/\s/g, '') : '', |
| | | cusPhone: this.form.cusPhone ? this.form.cusPhone.replace(/\s/g, '') : '', |
| | | cusIdcard: this.form.cusIdcard ? this.form.cusIdcard.replace(/\s/g, '') : '' |
| | | }; |
| | | |
| | | List.forEach((item) => { |
| | | if (item.list) { |
| | | item.list.forEach((item1) => { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | let copeWith = this.TotalPrice1; |
| | | let paidIn = this.TotalPrice.toString(); |
| | | let discount = this.discount; |
| | |
| | | getType: this.getType, |
| | | addAddress: this.addAddress, |
| | | tjCategory: this.tjCategory, |
| | | // 使用去掉空格后的数据 |
| | | cusName: processedForm.cusName, |
| | | cusPhone: processedForm.cusPhone, |
| | | cusIdcard: processedForm.cusIdcard |
| | | }; |
| | | } else { |
| | | data = { |
| | |
| | | tjType, |
| | | getType: this.getType, |
| | | tjCategory: this.tjCategory, |
| | | // 使用去掉空格后的数据 |
| | | cusName: processedForm.cusName, |
| | | cusPhone: processedForm.cusPhone, |
| | | cusIdcard: processedForm.cusIdcard |
| | | }; |
| | | } |
| | | |
| | | getOrder(data).then((res) => { |
| | | this.$modal.msgSuccess("提交成功"); |
| | | this.tjNumbers = res.msg; |