|  | @@ -435,6 +435,13 @@
 | 
	
		
			
				|  |  |            >
 | 
	
		
			
				|  |  |              <span>解除会员绑定</span>
 | 
	
		
			
				|  |  |            </el-button>
 | 
	
		
			
				|  |  | +          <el-button v-show="scope.row.fsUserId"
 | 
	
		
			
				|  |  | +            size="mini"
 | 
	
		
			
				|  |  | +            type="text"
 | 
	
		
			
				|  |  | +            @click="handleDiagnosis(scope.row)"
 | 
	
		
			
				|  |  | +          >
 | 
	
		
			
				|  |  | +            <span>初诊单</span>
 | 
	
		
			
				|  |  | +          </el-button>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <!--          <el-button v-if="scope.row.customerId"-->
 | 
	
		
			
				|  |  |  <!--            size="mini"-->
 | 
	
	
		
			
				|  | @@ -466,6 +473,82 @@
 | 
	
		
			
				|  |  |        @pagination="getList"
 | 
	
		
			
				|  |  |      />
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    <!-- 添加或修改初诊单对话框 -->
 | 
	
		
			
				|  |  | +    <el-dialog title="初诊单" :visible.sync="diagnosisOpen" width="1000px" append-to-body>
 | 
	
		
			
				|  |  | +      <el-form ref="diagnosisForm" :model="diagnosisForm" :rules="diagnosisRules" label-width="110px">
 | 
	
		
			
				|  |  | +        <el-row>
 | 
	
		
			
				|  |  | +          <el-col :span="12">
 | 
	
		
			
				|  |  | +            <el-form-item label="患者姓名" prop="patientName">
 | 
	
		
			
				|  |  | +              <el-input v-model="diagnosisForm.patientName" placeholder="请输入患者姓名" />
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +          <el-col :span="12">
 | 
	
		
			
				|  |  | +            <el-form-item label="年龄" prop="age">
 | 
	
		
			
				|  |  | +              <el-input-number v-model="diagnosisForm.age"  :min="1" label="年龄"></el-input-number>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +        </el-row>
 | 
	
		
			
				|  |  | +        <el-row>
 | 
	
		
			
				|  |  | +          <el-col :span="12">
 | 
	
		
			
				|  |  | +            <el-form-item label="患者电话" prop="phone">
 | 
	
		
			
				|  |  | +              <el-input v-model="diagnosisForm.phone" placeholder="请输入电话" />
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +          <el-col :span="12">
 | 
	
		
			
				|  |  | +            <el-form-item label="性别" prop="gender">
 | 
	
		
			
				|  |  | +              <el-select  v-model="diagnosisForm.gender">
 | 
	
		
			
				|  |  | +                <el-option label="未知" :value = "0"></el-option>
 | 
	
		
			
				|  |  | +                <el-option label="男性" :value = "1"></el-option>
 | 
	
		
			
				|  |  | +                <el-option label="女性" :value = "2"></el-option>
 | 
	
		
			
				|  |  | +              </el-select>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +        </el-row>
 | 
	
		
			
				|  |  | +        <el-row>
 | 
	
		
			
				|  |  | +          <el-col :span="12">
 | 
	
		
			
				|  |  | +            <el-form-item label="日期" prop="dateTime">
 | 
	
		
			
				|  |  | +              <el-date-picker clearable size="small"
 | 
	
		
			
				|  |  | +                v-model="diagnosisForm.dateTime"
 | 
	
		
			
				|  |  | +                type="date"
 | 
	
		
			
				|  |  | +                value-format="yyyy-MM-dd"
 | 
	
		
			
				|  |  | +                placeholder="选择日期">
 | 
	
		
			
				|  |  | +              </el-date-picker>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +          <el-col :span="12">
 | 
	
		
			
				|  |  | +            <el-form-item label="医生" prop="doctorId">
 | 
	
		
			
				|  |  | +              <el-select v-model="diagnosisForm.doctorId" placeholder="选择医生"  size="small" @change="doctorChange">
 | 
	
		
			
				|  |  | +                <el-option
 | 
	
		
			
				|  |  | +                  v-for="dict in doctorList"
 | 
	
		
			
				|  |  | +                  :key="dict.id"
 | 
	
		
			
				|  |  | +                  :label="dict.name"
 | 
	
		
			
				|  |  | +                  :value="dict.id"
 | 
	
		
			
				|  |  | +                />
 | 
	
		
			
				|  |  | +              </el-select>
 | 
	
		
			
				|  |  | +            </el-form-item>
 | 
	
		
			
				|  |  | +          </el-col>
 | 
	
		
			
				|  |  | +        </el-row>
 | 
	
		
			
				|  |  | +        <el-form-item label="身体状况" prop="physicalCondition">
 | 
	
		
			
				|  |  | +          <el-input v-model="diagnosisForm.physicalCondition" type="textarea" placeholder="请输入内容" />
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +        <el-form-item label="初步诊断" prop="firstDiagnosis">
 | 
	
		
			
				|  |  | +          <el-input v-model="diagnosisForm.firstDiagnosis" type="textarea" placeholder="请输入内容" />
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +        <el-form-item label="医生职称" prop="doctorDep">
 | 
	
		
			
				|  |  | +          <el-input disabled v-model="diagnosisForm.doctorDep" placeholder="医生职称" />
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +        <el-form-item label="医生证号" prop="doctorCertificate">
 | 
	
		
			
				|  |  | +          <el-input disabled v-model="diagnosisForm.doctorCertificate" placeholder="医生证号" />
 | 
	
		
			
				|  |  | +        </el-form-item>
 | 
	
		
			
				|  |  | +      </el-form>
 | 
	
		
			
				|  |  | +      <div slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  | +        <el-button type="primary" @click="diagnosisSubmitForm">确 定</el-button>
 | 
	
		
			
				|  |  | +        <el-button @click="diagnosisCancel">取 消</el-button>
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </el-dialog>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      <el-drawer size="75%" :title="show.title" :visible.sync="show.open">
 | 
	
		
			
				|  |  |        <customer-details  ref="customerDetails" @refreshList="refreshList"/>
 | 
	
		
			
				|  |  |      </el-drawer>
 | 
	
	
		
			
				|  | @@ -751,6 +834,7 @@ import {
 | 
	
		
			
				|  |  |  } from '@/api/qw/externalContact'
 | 
	
		
			
				|  |  |  import info from "@/views/qw/externalContact/info.vue";
 | 
	
		
			
				|  |  |  import {getMyQwUserList, getMyQwCompanyList, handleInputAuthAppKey, updateUser} from "@/api/qw/user";
 | 
	
		
			
				|  |  | +import {addFsFirstDiagnosis, updateFsFirstDiagnosis, getFsFirstDiagnosis} from "@/api/company/firstDiagnosis";
 | 
	
		
			
				|  |  |  import {listTag, getTag, searchTags,} from "@/api/qw/tag";
 | 
	
		
			
				|  |  |  import { allListTagGroup} from "../../../api/qw/tagGroup";
 | 
	
		
			
				|  |  |  import mycustomer from '@/views/qw/externalContact/mycustomer'
 | 
	
	
		
			
				|  | @@ -759,12 +843,17 @@ import SopDialog from '@/views/course/sop/SopDialog.vue'
 | 
	
		
			
				|  |  |  import  selectUser  from "@/views/qw/externalContact/selectUser.vue";
 | 
	
		
			
				|  |  |  import { editTalk,editAllTalk } from "@/api/qw/externalContactInfo";
 | 
	
		
			
				|  |  |  import {createLinkUrl} from "@/api/course/sopCourseLink";
 | 
	
		
			
				|  |  | +import {docList} from "@/api/doctor/doctor";
 | 
	
		
			
				|  |  |  import PaginationMore from "../../../components/PaginationMore/index.vue";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "ExternalContact",
 | 
	
		
			
				|  |  |    components:{PaginationMore, mycustomer,customerDetails,SopDialog,selectUser,info},
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      doctorList:[],
 | 
	
		
			
				|  |  | +      diagnosisForm:{},
 | 
	
		
			
				|  |  | +      diagnosisOpen:false,
 | 
	
		
			
				|  |  | +      diagnosisRules:{},
 | 
	
		
			
				|  |  |        notesOpen: {
 | 
	
		
			
				|  |  |          type: 1,
 | 
	
		
			
				|  |  |          nameType: 3,
 | 
	
	
		
			
				|  | @@ -938,7 +1027,8 @@ export default {
 | 
	
		
			
				|  |  |        statusOptions:[],
 | 
	
		
			
				|  |  |        // 表单校验
 | 
	
		
			
				|  |  |        rules: {
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      fsUserId: null,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    created() {
 | 
	
	
		
			
				|  | @@ -972,9 +1062,55 @@ export default {
 | 
	
		
			
				|  |  |      this.getDicts("sys_qw_transfer_status").then(response => {
 | 
	
		
			
				|  |  |        this.transferStatusOptions = response.data;
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | +    this.getDocList();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    doctorChange(val){
 | 
	
		
			
				|  |  | +      for(const doctor of this.doctorList) {
 | 
	
		
			
				|  |  | +        if(doctor.id == val) {
 | 
	
		
			
				|  |  | +          this.diagnosisForm.doctorDep = doctor.position;
 | 
	
		
			
				|  |  | +          this.diagnosisForm.doctorCertificate = doctor.certificateCode;
 | 
	
		
			
				|  |  | +          this.diagnosisForm.doctorName = doctor.name;
 | 
	
		
			
				|  |  | +          break;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      console.log(this.diagnosisForm)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    getDocList(){
 | 
	
		
			
				|  |  | +      docList().then(res => {
 | 
	
		
			
				|  |  | +        this.doctorList = res.rows;
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    handleDiagnosis(row){
 | 
	
		
			
				|  |  | +      getFsFirstDiagnosis(row.fsUserId).then(res => {
 | 
	
		
			
				|  |  | +        this.diagnosisForm = res.data;
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +      this.fsUserId = row.fsUserId;
 | 
	
		
			
				|  |  | +      this.diagnosisOpen = true;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +   diagnosisSubmitForm(){
 | 
	
		
			
				|  |  | +    this.$refs["diagnosisForm"].validate(valid => {
 | 
	
		
			
				|  |  | +        if (valid) {
 | 
	
		
			
				|  |  | +          this.diagnosisForm.qwUserId = this.queryParams.qwUserId;
 | 
	
		
			
				|  |  | +          this.diagnosisForm.userId = this.fsUserId;
 | 
	
		
			
				|  |  | +          if (this.diagnosisForm.id != null) {
 | 
	
		
			
				|  |  | +            updateFsFirstDiagnosis(this.diagnosisForm).then(response => {
 | 
	
		
			
				|  |  | +              this.msgSuccess("修改成功");
 | 
	
		
			
				|  |  | +              this.diagnosisOpen = false;
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          } else {
 | 
	
		
			
				|  |  | +            addFsFirstDiagnosis(this.diagnosisForm).then(response => {
 | 
	
		
			
				|  |  | +              this.msgSuccess("新增成功");
 | 
	
		
			
				|  |  | +              this.diagnosisOpen = false;
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +   },
 | 
	
		
			
				|  |  | +   diagnosisCancel(){
 | 
	
		
			
				|  |  | +    this.diagnosisOpen = false;
 | 
	
		
			
				|  |  | +   },
 | 
	
		
			
				|  |  |  	 change(){
 | 
	
		
			
				|  |  |  		if(this.createTime!=null){
 | 
	
		
			
				|  |  |  		  this.queryParams.sTime=this.createTime[0];
 |