Browse Source

添加到场医生姓名

11-plugin-be-present
aBin 4 years ago
parent
commit
09242efafd
  1. 53
      index.html

53
index.html

@ -62,12 +62,13 @@
<img style="height:16px" src="https://www.tall.wiki/staticrec/photos/right.png">
</div>
<div class="time-box w-screen h-screen fixed z-10" style="background: rgba(0,0,0,0.65);top:0;left:0;display:none">
<div class="flex flex-col absolute w-full" style="background:#fff;bottom: 0;height:300px">
<div class="flex flex-col absolute w-full" style="background:#fff;bottom: 0;height:351px">
<div class="flex justify-between p-2 border-gray-200 border-b-2" style="height:44px;">
<div class="text-gray-500" onclick="p1419895701453938688.cancelTime()">取消</div>
<div>到场时间</div>
<div>到场信息</div>
<div class="text-blue-500" onclick="p1419895701453938688.changeTime()">确定</div>
</div>
<input class="doctorName" style="width: 64%;margin: 8px 18%;padding: 6px 0 6px 10px;border: 1px solid #333;font-size: 14px" placeholder="请输入姓名" type="text" />
<div class="flex flex-1 items-center overflow-hidden">
<div class="h-full flex flex-row text-center w-1/6 overflow-x-hidden relative">
<div class="h-full mx-auto absolute" style="right:-8px">
@ -209,6 +210,51 @@
})
},
/**
* 确定 添加到场人员信息
* @param { String } projectId 项目ID
* @param { String } name 医生名字
* @param { String } stepId 环节id
* @param { String } time 到场时间
* @param { Number } codeAndAnswerList 提交人类型(0平车 1人)
*/
addArriveWorker(time, name){
var that = this;
var params = JSON.stringify({
param: {
projectId: that.projectId,
workerInfoList: [
{
name,
stepId: '',
time,
type: 1,
}
]
}
});
fetch('https://www.tall.wiki/gateway/qcp/v3.0/worker/addArriveWorker', {
headers: new Headers({
'Authorization': 'Bearer ' + that.token,
'Content-Type': 'application/json;charset=utf-8'
}),
method: 'POST',
mode: 'cors',
body: params
}).then(function(response) {
return response.json();
}).catch(function(error){
console.error('Error:', error)
}).then(function(res){
var { success, code, data, msg } = res;
if (success && code === 200) {
// that.setDate()
} else {
alert(msg || '添加失败')
}
})
},
// 界面渲染
setDate(res) {
var { dom } = this;
@ -308,6 +354,9 @@
this.chooseTimeValue = new Date(chooseTime).getTime()
if(chooseTime){
await this.choose(new Date(chooseTime).getTime())
// 医生名字
var doctorName = this.dom.querySelector('.doctorName');
await this.addArriveWorker(new Date(chooseTime).getTime(), doctorName.value)
this.cancelTime()
}
},

Loading…
Cancel
Save