hwy il y a 1 mois
Parent
commit
df88e8c908
1 fichiers modifiés avec 55 ajouts et 58 suppressions
  1. 55 58
      app/rehabilitation/html/toDoorService.html

+ 55 - 58
app/rehabilitation/html/toDoorService.html

@ -55,11 +55,11 @@
        text-align: center;
        line-height: 40px;
      }
      .required-icon{
      .required-icon {
        position: relative;
      }
      .required-icon::after{
        content: "*";
      .required-icon::after {
        content: '*';
        position: absolute;
        left: -10px;
        color: #ed2d2d;
@ -102,7 +102,7 @@
          <div class="form-label">联系方式</div>
          <div class="form-value">{{patientInfo.mobile}}</div>
        </div>
        <div class="address-box ">
        <div class="address-box">
          <div class="flex required-icon">
            <div>上门地址</div>
            <el-input v-model="serveAddress" placeholder="请输入上门地址" size="small" style="width: 200px" @change="getAddressPoint"></el-input>
@ -116,7 +116,7 @@
        <div class="form-item">
          <div class="form-label required-icon">希望服务时间</div>
          <div class="form-value">
            <el-date-picker v-model="time" type="date" style="width: 150px;" size="small" value-format="yyyy-MM-dd" placeholder="选择日期时间"></el-date-picker>
            <el-date-picker v-model="time" type="date" style="width: 150px" size="small" value-format="yyyy-MM-dd" placeholder="选择日期时间"></el-date-picker>
            <el-time-picker
              is-range
              v-model="time1"
@ -125,8 +125,8 @@
              placeholder="选择时间范围"
              range-separator="-"
              value-format="HH:mm"
              size="small" style="width: 240px;">
            </el-time-picker>
              size="small"
              style="width: 240px"></el-time-picker>
          </div>
        </div>
        <div class="form-item">
@ -184,7 +184,7 @@
        },
        methods: {
          toSelectService() {
            const vm = this
            var vm = this
            // this.$message.warning('暂无可供选择的服务,请在下方直接描述您所需的服务')
            sessionStorage.setItem('serviceList', JSON.stringify(this.serviceList))
            top.layer.open({
@ -199,7 +199,7 @@
              shadeClose: false, //点击遮罩关闭层
              content: `../../rehabilitation/html/serviceDialog.html`,
              end: function () {
                const val = sessionStorage.getItem('serviceList')
                var val = sessionStorage.getItem('serviceList')
                if (val) {
                  sessionStorage.removeItem('serviceList')
@ -209,7 +209,7 @@
            })
          },
          getPatientInfo() {
            const vm = this
            var vm = this
            httpRequest.post('doctor/patient_label_info/patient', { data: { patient: this.patient } }).then(function (res) {
              vm.patientInfo = res.data
            })
@ -218,7 +218,7 @@
            var vm = this
            // 初始化地图, 设置中心点坐标和地图级别
            vm.bmap = new BMap.Map('map2')
            const point = new BMap.Point(116.404, 39.915) // 创建点坐标
            var point = new BMap.Point(116.404, 39.915) // 创建点坐标
            vm.bmap.centerAndZoom(point, 15) // 初始化地图,设置中心点坐标和缩放级别
            // 添加缩放控件
            // var zoomCtrl = new BMap.ZoomControl({
@ -296,7 +296,7 @@
              shadeClose: false, //点击遮罩关闭层
              content: `../../rehabilitation/html/selectDoctor.html?patient=${this.patient}`,
              end: function () {
                const val = sessionStorage.getItem('selectDoctor')
                var val = sessionStorage.getItem('selectDoctor')
                if (val) {
                  sessionStorage.removeItem('selectDoctor')
@ -306,9 +306,8 @@
            })
          },
          reservationFn() {
            
            var nowDate = new Date().getTime()
            var serviceDate = new Date(this.time + " "+ this.time1[0]).getTime()
            var serviceDate = new Date(this.time + ' ' + this.time1[0]).getTime()
            var vm = this
            if (!vm.serveAddress) {
              vm.$message.warning('请输入上门地址')
@ -322,7 +321,7 @@
              vm.$message.warning('请选择服务医生')
              return
            }
            if(!this.time1){
            if (!this.time1) {
              vm.$message.warning('请输入希望服务时间')
              return
            }
@ -330,7 +329,7 @@
              this.$message.warning('服务时间不能早于当前时间')
              return
            }
            
            var params = {
              dataJson: JSON.stringify({
                rehabilitationDetailId: this.detailId,
@ -368,7 +367,7 @@
                  patient: vm.patient,
                  patientName: vm.patientInfo.name,
                  patientPhone: vm.patientInfo.mobile,
                  patientExpectedServeTime: `${vm.time} ${vm.time1[0]}-${vm.time1[1]}` ,
                  patientExpectedServeTime: `${vm.time} ${vm.time1[0]}-${vm.time1[1]}`,
                  serveDesc: vm.serveDesc,
                  serveTown: vm.patientInfo.townName,
                  serveAddress: vm.serveAddress,
@ -389,14 +388,13 @@
              })
            }
            if(this.relationCode){
            if (this.relationCode) {
              // 内部 代预约
              this.createSend(param)
            }else{
            } else {
              // 外部 代预约
              this.saveRehabilitationOperateRecord(params, param)
            }
            
          },
          saveRehabilitationOperateRecord(params, param) {
            var vm = this
@ -418,41 +416,41 @@
            httpRequest.post(url, { data: param }).then(function (res) {
              if (res.status == 200) {
                vm.$message.success('预约成功!')
                if(vm.relationCode){
                if (vm.relationCode) {
                  // 内部
                  vm.createOperateRecord()
                }else{
                  vm.updateNoteAndImageRehabilitationOperate("代预约成功")
                } else {
                  vm.updateNoteAndImageRehabilitationOperate('代预约成功')
                  // 外部
                } 
                }
              } else {
                vm.$message.error(res.msg)
              }
            })
          },
          createOperateRecord(cb){
          createOperateRecord(cb) {
            var vm = this
            var url = "doctor/specialist/rehabilitation/saveRehabilitationOperateRecord",
                obj = {
                    rehabilitationDetailId: vm.detailId,
                    patientCode: vm.patient,
                    patientName: vm.patientInfo.patientName,
                    doctorCode: vm.docInfo.code,
                    doctorName: vm.docInfo.name,
                    relationRecordType: 5, //上传附件
                    relationRecordCode: "",
                    status: 0
                };
                
            var url = 'doctor/specialist/rehabilitation/saveRehabilitationOperateRecord',
              obj = {
                rehabilitationDetailId: vm.detailId,
                patientCode: vm.patient,
                patientName: vm.patientInfo.patientName,
                doctorCode: vm.docInfo.code,
                doctorName: vm.docInfo.name,
                relationRecordType: 5, //上传附件
                relationRecordCode: '',
                status: 0
              }
            var params = {
                dataJson: JSON.stringify(obj)
            };
            httpRequest.post(url, {data:params}).then(function(res){
              dataJson: JSON.stringify(obj)
            }
            httpRequest.post(url, { data: params }).then(function (res) {
              if (res.status == 200) {
                console.log("vm.done()");
                
                  vm.done()
                }
                console.log('vm.done()')
                vm.done()
              }
            })
          },
          updateNoteAndImageRehabilitationOperate(text) {
@ -462,35 +460,34 @@
              node: text,
              image: ''
            }
            var uRl =
              '/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate'
            httpRequest.post(uRl,{data:params}).then(function(res){
              if(res.status == 200){
            var uRl = '/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate'
            httpRequest.post(uRl, { data: params }).then(function (res) {
              if (res.status == 200) {
                var index = parent.layer.getFrameIndex(window.name)
                parent.layer.close(index)
              }else{
              } else {
                vm.$message.error(res.msg || '服务记录失败')
              }
            })
          },
          done(){
          done() {
            var vm = this
            var url = "/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate"
            var url = '/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate'
            var params = {
              planDetailId: vm.detailId,
              node: vm.notes || "",
              image: ""
            };
            if(vm.relationCode){
              node: vm.notes || '',
              image: ''
            }
            if (vm.relationCode) {
              params.relationCode = vm.relationCode
            }
            httpRequest.post(url,{data:params}).then(function(res){
              if(res.status == 200){
            httpRequest.post(url, { data: params }).then(function (res) {
              if (res.status == 200) {
                var index = parent.layer.getFrameIndex(window.name)
                parent.layer.close(index)
              }
            })
          } 
          }
        }
      })
    </script>