|
@@ -200,8 +200,8 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item :label="this.$t('customerManage.doctor')">
|
|
|
- <el-select v-model="formmodel.doctor_id" :placeholder="this.$t('customerManage.choiceDoctor')" clearable
|
|
|
- @change="doctorChange(1)">
|
|
|
+ <el-select v-model="formmodel.doctor_id" :placeholder="this.$t('customerManage.choiceDoctor')" clearable>
|
|
|
+<!-- @change="doctorChange(1)">-->
|
|
|
<el-option v-for="(item,index) in doctors" :key="index"
|
|
|
:label="item.clerk_name" :value="item.clerk_id"/>
|
|
|
</el-select>
|
|
@@ -209,8 +209,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item :label="this.$t('customerManage.nurse')">
|
|
|
- <el-select v-model="formmodel.nurse_id" :placeholder="this.$t('customerManage.choiceNurse')" clearable
|
|
|
- @change="doctorChange(2)">
|
|
|
+ <el-select v-model="formmodel.nurse_id" :placeholder="this.$t('customerManage.choiceNurse')" clearable>
|
|
|
+<!-- @change="doctorChange(2)">-->
|
|
|
<el-option v-for="(item,index) in nurses" :key="index"
|
|
|
:label="item.clerk_name" :value="item.clerk_id"/>
|
|
|
</el-select>
|
|
@@ -218,8 +218,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item :label="this.$t('customerManage.worker')">
|
|
|
- <el-select v-model="formmodel.worker_id" :placeholder="this.$t('customerManage.choiceWorker')" clearable
|
|
|
- @change="doctorChange(3)">
|
|
|
+ <el-select v-model="formmodel.worker_id" :placeholder="this.$t('customerManage.choiceWorker')" clearable>
|
|
|
+<!-- @change="doctorChange(3)">-->
|
|
|
<el-option v-for="(item,index) in workers" :key="index"
|
|
|
:label="item.clerk_name" :value="item.clerk_id"/>
|
|
|
</el-select>
|
|
@@ -529,6 +529,7 @@
|
|
|
import * as API_User from '@/api/user'
|
|
|
import * as API_Clerk from '@/api/ncs_clerk'
|
|
|
import * as API_NurseConfig from '@/api/ncs_nurse_config'
|
|
|
+ import * as API_CustomerMapping from "@/api/ncs_customer_mapping";
|
|
|
import vitalSignLog from '@/views/vital-sign/log'
|
|
|
import vueQr from "vue-qr";
|
|
|
import {FRAME_TYPE} from "@/utils/enum/FrameTypeEnum";
|
|
@@ -686,6 +687,7 @@
|
|
|
workers: [],
|
|
|
nurseData: [],
|
|
|
nurseconfigSelection: [],
|
|
|
+ deleteNurseConfig: [],
|
|
|
sexTransfer: [
|
|
|
{key: this.$t('member.man'), value: 1, color: 'green'},
|
|
|
{key: this.$t('member.woman'), value: 0, color: 'red'}
|
|
@@ -1146,7 +1148,6 @@
|
|
|
},
|
|
|
/** 生日选择变化,修改年龄字段 */
|
|
|
birthdayChange(val) {
|
|
|
- console.log(val)
|
|
|
const ageObj = this.getAge(val)
|
|
|
console.log('ageobj', ageObj)
|
|
|
this.$set(this.formmodel, 'age_unit', ageObj.ageunit)
|
|
@@ -1261,12 +1262,19 @@
|
|
|
this.$message.success(this.$t('action.editSuccess'))
|
|
|
this.customerFormVisible = false
|
|
|
this.getList()
|
|
|
- this.isDisabled = false
|
|
|
- this.$emit('saved')
|
|
|
+ this.isDisabled = false
|
|
|
+ this.$emit('saved')
|
|
|
}).catch(err => {
|
|
|
this.$message.error(err.message)
|
|
|
this.isDisabled = false
|
|
|
})
|
|
|
+ if (this.deleteNurseConfig.length > 0) {
|
|
|
+ console.log("this.deleteNurseConfig = " + this.deleteNurseConfig)
|
|
|
+ API_CustomerMapping.deleteByCustomerAndNurseConfigId(this.formmodel.id, this.deleteNurseConfig).then(res => {
|
|
|
+ this.isDisabled = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error(this.$t('action.fromError'))
|
|
@@ -1454,11 +1462,7 @@
|
|
|
},
|
|
|
/** 添加亲属 */
|
|
|
addRelative() {
|
|
|
- console.log('8888888888888888888888888888')
|
|
|
- console.log(this.$refs['relativeForm'])
|
|
|
this.$refs['relativeForm'].validate(valid => {
|
|
|
- console.log('222222222222222')
|
|
|
- console.log(valid)
|
|
|
if (valid) {
|
|
|
this.relativeFormModel.relative_id = this.formmodel.member_id
|
|
|
API_User.addRelative(this.relativeFormModel).then(res => {
|
|
@@ -1587,31 +1591,36 @@
|
|
|
* 医护人员选择变化
|
|
|
* @param type
|
|
|
*/
|
|
|
- doctorChange(type) {
|
|
|
- if (this.customerId !== 0) {
|
|
|
- if (type === 1) {
|
|
|
- if (this.doctor_mapping_id === null) {
|
|
|
- this.formmodel.doctor_mapping_id = 0 // 为0则新增,// 其他值为修改
|
|
|
- } else {
|
|
|
- this.formmodel.doctor_mapping_id = this.doctor_mapping_id
|
|
|
- }
|
|
|
- } else if (type === 2) {
|
|
|
- if (this.nurse_Mapping_id === null) {
|
|
|
- this.formmodel.nurse_Mapping_id = 0 // 为0则新增,// 其他值为修改
|
|
|
- } else {
|
|
|
- this.formmodel.nurse_Mapping_id = this.nurse_Mapping_id
|
|
|
- }
|
|
|
- } else if (type === 3) {
|
|
|
- if (this.worker_mapping_id === null) {
|
|
|
- this.formmodel.worker_mapping_id = 0 // 为0则新增,// 其他值为修改
|
|
|
- } else {
|
|
|
- this.formmodel.worker_mapping_id = this.worker_mapping_id
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ // doctorChange(type) {
|
|
|
+ // if (this.customerId !== 0) {
|
|
|
+ // if (type === 1) {
|
|
|
+ // if (this.doctor_mapping_id === null) {
|
|
|
+ // this.formmodel.doctor_mapping_id = 0 // 为0则新增,// 其他值为修改
|
|
|
+ // } else {
|
|
|
+ // this.formmodel.doctor_mapping_id = this.doctor_mapping_id
|
|
|
+ // }
|
|
|
+ // } else if (type === 2) {
|
|
|
+ // if (this.nurse_mapping_id === null) {
|
|
|
+ // this.formmodel.nurse_mapping_id = 0 // 为0则新增,// 其他值为修改
|
|
|
+ // } else {
|
|
|
+ // this.formmodel.nurse_mapping_id = this.nurse_mapping_id
|
|
|
+ // }
|
|
|
+ // } else if (type === 3) {
|
|
|
+ // if (this.worker_mapping_id === null) {
|
|
|
+ // this.formmodel.worker_mapping_id = 0 // 为0则新增,// 其他值为修改
|
|
|
+ // } else {
|
|
|
+ // this.formmodel.worker_mapping_id = this.worker_mapping_id
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
// 护理项选择 设置选中项的颜色
|
|
|
changeNurseData(val, configid, index) {
|
|
|
+ if (val === null || val === '') {
|
|
|
+ this.setDeleteNurseConfig(configid);
|
|
|
+ } else {
|
|
|
+ this.removeDeleteNurseConfig(configid)
|
|
|
+ }
|
|
|
const currentCfg = this.nurseconfigSelection.find(p => p.config.id === configid).options.find(p => p.id === val)
|
|
|
if (currentCfg) {
|
|
|
this.$refs['patient_nurse_' + configid][0].$el.getElementsByClassName('el-input__inner')[0].style = 'color:#' + currentCfg.color_rgb + ' !important'
|
|
@@ -1709,6 +1718,15 @@
|
|
|
this.formmodel.sex = 1
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ setDeleteNurseConfig(config) {
|
|
|
+ this.deleteNurseConfig.push(config)
|
|
|
+ },
|
|
|
+ removeDeleteNurseConfig(config) {
|
|
|
+ var index = this.deleteNurseConfig.map(item => item).indexOf(config)
|
|
|
+ if (index != null) {
|
|
|
+ this.deleteNurseConfig.splice(index, index + 1)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|