| | |
| | | <el-button v-show="lishi" type="primary" @click="cope" size="mini">一键复制</el-button> |
| | | <el-button type="primary" @click="inputChanges" v-show="lishi" size="mini" |
| | | :disabled="confirm">历史体检记录</el-button> |
| | | <el-button :disabled="isDisabled" type="primary" size="mini" @click="submitForm">登记</el-button> |
| | | <el-button :disabled="butopen" type="primary" size="mini" @click="submitForm">登记</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" @queryTable="getList">重置</el-button> |
| | | </div> |
| | | </el-col> |
| | |
| | | // 非单个禁用 |
| | | single: true, |
| | | cardreader: false, |
| | | butopen:false, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | nodeobj: {}, |
| | |
| | | /** 登记提交按钮 */ |
| | | submitForm() { |
| | | let _this = this; |
| | | _this.butopen = true; |
| | | if (!this.form.cusPhone || !this.form.cusName) { |
| | | this.$message.warning("请填选必填项"); |
| | | return; |
| | |
| | | // } |
| | | |
| | | addCustomer(formData).then((response) => { |
| | | _this.butopen = false; |
| | | this.responseList = response.data; |
| | | this.form.tjType = this.dict.type.dict_team[0].value; |
| | | this.$modal.msgSuccess("新增成功"); |
| | |
| | | _this.isDisabled = true; |
| | | _this.top = false; |
| | | }).catch((error) => { |
| | | _this.butopen = false; |
| | | this.$modal.msgError("登记失败,请检查数据"); |
| | | console.error("Error in addCustomer:", error); |
| | | }); |
| | |
| | | if (isChineseChar(resultObj.data.sex)) { |
| | | _this.form.cusSex = resultObj.data.sex == "女" ? 1 : 0 |
| | | } else { |
| | | _this.form.cusSex = resultObj.data.sex; |
| | | _this.form.cusSex = resultObj.data.sex == "1" ? 0 : 1; |
| | | } |
| | | _this.form.cusNational = resultObj.data.mz; |
| | | _this.form.cusBrithday = resultObj.data.csrq; |
| | |
| | | websocket.onmessage = function (event) { |
| | | var resultObj = JSON.parse(event.data); |
| | | _this.form.cusName = resultObj.data.name; |
| | | _this.form.cusSex = resultObj.data.sex; |
| | | const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char) |
| | | // _this.form.cusSex = resultObj.data.sex; |
| | | if (isChineseChar(resultObj.data.sex)) { |
| | | _this.form.cusSex = resultObj.data.sex == "女" ? 1 : 0 |
| | | } else { |
| | | _this.form.cusSex = resultObj.data.sex == "1" ? 0 : 1; |
| | | } |
| | | _this.form.cusNational = resultObj.data.mz; |
| | | _this.form.cusBrithday = resultObj.data.csrq; |
| | | if (_this.form.cusBrithday) { |