|
@ -283,7 +283,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
toSelectDoctor() {
|
|
toSelectDoctor() {
|
|
const vm = this
|
|
|
|
|
|
var vm = this
|
|
top.layer.open({
|
|
top.layer.open({
|
|
type: 2,
|
|
type: 2,
|
|
area: ['500px', '700px'],
|
|
area: ['500px', '700px'],
|
|
@ -307,9 +307,9 @@
|
|
},
|
|
},
|
|
reservationFn() {
|
|
reservationFn() {
|
|
|
|
|
|
const nowDate = new Date().getTime()
|
|
|
|
const serviceDate = new Date(this.time + " "+ this.time1[0]).getTime()
|
|
|
|
const vm = this
|
|
|
|
|
|
var nowDate = new Date().getTime()
|
|
|
|
var serviceDate = new Date(this.time + " "+ this.time1[0]).getTime()
|
|
|
|
var vm = this
|
|
if (!vm.serveAddress) {
|
|
if (!vm.serveAddress) {
|
|
vm.$message.warning('请输入上门地址')
|
|
vm.$message.warning('请输入上门地址')
|
|
return
|
|
return
|
|
@ -331,7 +331,7 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
var params = {
|
|
dataJson: JSON.stringify({
|
|
dataJson: JSON.stringify({
|
|
rehabilitationDetailId: this.detailId,
|
|
rehabilitationDetailId: this.detailId,
|
|
patientCode: this.patient,
|
|
patientCode: this.patient,
|
|
@ -346,7 +346,7 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
const packageItemArr = []
|
|
|
|
|
|
var packageItemArr = []
|
|
this.serviceList.forEach(function (item) {
|
|
this.serviceList.forEach(function (item) {
|
|
packageItemArr.push({
|
|
packageItemArr.push({
|
|
type: 1,
|
|
type: 1,
|
|
@ -390,14 +390,16 @@
|
|
}
|
|
}
|
|
|
|
|
|
if(this.relationCode){
|
|
if(this.relationCode){
|
|
|
|
// 内部 代预约
|
|
this.createSend(param)
|
|
this.createSend(param)
|
|
}else{
|
|
}else{
|
|
|
|
// 外部 代预约
|
|
this.saveRehabilitationOperateRecord(params, param)
|
|
this.saveRehabilitationOperateRecord(params, param)
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
saveRehabilitationOperateRecord(params, param) {
|
|
saveRehabilitationOperateRecord(params, param) {
|
|
const vm = this
|
|
|
|
|
|
var vm = this
|
|
var url = 'doctor/specialist/rehabilitation/saveRehabilitationOperateRecord'
|
|
var url = 'doctor/specialist/rehabilitation/saveRehabilitationOperateRecord'
|
|
httpRequest.post(url, { data: params }).then(function (res) {
|
|
httpRequest.post(url, { data: params }).then(function (res) {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@ -411,20 +413,25 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
createSend(param) {
|
|
createSend(param) {
|
|
const vm = this
|
|
|
|
|
|
var vm = this
|
|
var url = 'doctor/serviceOrder/proxyCreate'
|
|
var url = 'doctor/serviceOrder/proxyCreate'
|
|
httpRequest.post(url, { data: param }).then(function (res) {
|
|
httpRequest.post(url, { data: param }).then(function (res) {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
vm.$message.success('预约成功!')
|
|
vm.$message.success('预约成功!')
|
|
var index = parent.layer.getFrameIndex(window.name)
|
|
|
|
parent.layer.close(index)
|
|
|
|
|
|
if(vm.relationCode){
|
|
|
|
// 内部
|
|
|
|
vm.createOperateRecord()
|
|
|
|
}else{
|
|
|
|
vm.updateNoteAndImageRehabilitationOperate("代预约成功")
|
|
|
|
// 外部
|
|
|
|
}
|
|
} else {
|
|
} else {
|
|
vm.$message.error(res.msg)
|
|
vm.$message.error(res.msg)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
createOperateRecord(vm,cb){
|
|
|
|
const vm = this
|
|
|
|
|
|
createOperateRecord(cb){
|
|
|
|
var vm = this
|
|
var url = "doctor/specialist/rehabilitation/saveRehabilitationOperateRecord",
|
|
var url = "doctor/specialist/rehabilitation/saveRehabilitationOperateRecord",
|
|
obj = {
|
|
obj = {
|
|
rehabilitationDetailId: vm.detailId,
|
|
rehabilitationDetailId: vm.detailId,
|
|
@ -440,38 +447,50 @@
|
|
var params = {
|
|
var params = {
|
|
dataJson: JSON.stringify(obj)
|
|
dataJson: JSON.stringify(obj)
|
|
};
|
|
};
|
|
plus.nativeUI.showWaiting();
|
|
|
|
sendPost(url, params, null, function(res){
|
|
|
|
if (res.status == 200) {
|
|
|
|
cb&&cb()
|
|
|
|
}else{
|
|
|
|
|
|
httpRequest.post(url, {data:params}).then(function(res){
|
|
|
|
if (res.status == 200) {
|
|
|
|
console.log("vm.done()");
|
|
|
|
|
|
|
|
vm.done()
|
|
}
|
|
}
|
|
plus.nativeUI.closeWaiting();
|
|
|
|
});
|
|
|
|
|
|
})
|
|
},
|
|
},
|
|
updateNoteAndImageRehabilitationOperate(text) {
|
|
updateNoteAndImageRehabilitationOperate(text) {
|
|
const vm = this
|
|
|
|
|
|
var vm = this
|
|
var params = {
|
|
var params = {
|
|
planDetailId: detailId,
|
|
|
|
|
|
planDetailId: vm.detailId,
|
|
node: text,
|
|
node: text,
|
|
image: ''
|
|
image: ''
|
|
}
|
|
}
|
|
if (vm.detailInfo.type == '6') {
|
|
|
|
params.relationCode = vm.followId || ''
|
|
|
|
params.flag = vm.followFlag || ''
|
|
|
|
}
|
|
|
|
plus.nativeUI.showWaiting('提交中..')
|
|
|
|
var uRl =
|
|
var uRl =
|
|
'/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate'
|
|
'/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate'
|
|
sendPost(uRl, params, null, function (res) {
|
|
|
|
plus.nativeUI.closeWaiting()
|
|
|
|
if (res.status == 200) {
|
|
|
|
freeListGet(vm)
|
|
|
|
} else {
|
|
|
|
mui.toast(res.msg || '服务记录失败')
|
|
|
|
|
|
httpRequest.post(uRl,{data:params}).then(function(res){
|
|
|
|
if(res.status == 200){
|
|
|
|
var index = parent.layer.getFrameIndex(window.name)
|
|
|
|
parent.layer.close(index)
|
|
|
|
}else{
|
|
|
|
vm.$message.error(res.msg || '服务记录失败')
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
|
|
},
|
|
|
|
done(){
|
|
|
|
var vm = this
|
|
|
|
var url = "/doctor/specialist/rehabilitation/updateNoteAndImageRehabilitationOperate"
|
|
|
|
var params = {
|
|
|
|
planDetailId: vm.detailId,
|
|
|
|
node: vm.notes || "",
|
|
|
|
image: ""
|
|
|
|
};
|
|
|
|
if(vm.relationCode){
|
|
|
|
params.relationCode = vm.relationCode
|
|
|
|
}
|
|
|
|
httpRequest.post(url,{data:params}).then(function(res){
|
|
|
|
if(res.status == 200){
|
|
|
|
var index = parent.layer.getFrameIndex(window.name)
|
|
|
|
parent.layer.close(index)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|