|
@@ -51,7 +51,7 @@
|
|
|
<form id="dtp-form-newcfxx" class="customize-search-form">
|
|
|
<div class="customize-form-group-container">
|
|
|
<div class="customize-form-group">
|
|
|
- <label>医院:</label>
|
|
|
+ <label class="is-required">医院:</label>
|
|
|
<!-- <input name="hospital" placeholder="医院" id="hospital" class="styled-input" type="text">-->
|
|
|
<select id="hospital-select" name="hospital" class="styled-input form-control select2-multiple" placeholder="请选择或输入搜索">
|
|
|
<option value="">请选择医院</option>
|
|
@@ -66,15 +66,14 @@
|
|
|
<input name="department" id="department" placeholder="科室" class="styled-input" type="text">
|
|
|
</div>
|
|
|
<div class="customize-form-group">
|
|
|
- <label class="is-required">处方诊断::</label>
|
|
|
+ <label class="is-required">处方诊断:</label>
|
|
|
<input name="prescriptionDiagnosis" id="prescriptionDiagnosis" placeholder="处方诊断" class="styled-input" type="text">
|
|
|
</div>
|
|
|
<div class="customize-form-group">
|
|
|
- <label class="is-required">主管医生:</label>
|
|
|
+ <label>主管医生:</label>
|
|
|
<input name="attendingDoctor" id="attendingDoctor" placeholder="主管医生" class="styled-input" type="text">
|
|
|
</div>
|
|
|
<div class="customize-form-group-container">
|
|
|
-
|
|
|
</div>
|
|
|
<!-- <div class="customize-form-group">-->
|
|
|
<!-- <label class="is-required">临床诊断:</label>-->
|
|
@@ -252,7 +251,7 @@
|
|
|
var selectdataList=[];
|
|
|
var prescriptionNumber;
|
|
|
var drugsLinkId;
|
|
|
- var reviewFlag=false;
|
|
|
+ var reviewFlag=true;
|
|
|
var reviewFormData = new FormData();
|
|
|
$(document).ready(function() {
|
|
|
|
|
@@ -509,17 +508,17 @@ function initTab(datas){
|
|
|
$('#drugInfoTable tbody tr').each(function(index, row) {
|
|
|
var rowData = {
|
|
|
productId: $(row).data('product-id'),
|
|
|
- mdmCode: $(row).find('td:eq(1)').text().trim(),
|
|
|
- productName: $(row).find('td:eq(2)').text().trim(),
|
|
|
- genericName: $(row).find('td:eq(3)').text().trim(),
|
|
|
- specification: $(row).find('td:eq(4)').text().trim(),
|
|
|
- manufacturerShortName: $(row).find('td:eq(5)').text().trim(),
|
|
|
- administrationMethod: $(row).find('td:eq(6)').text().trim(),
|
|
|
- followUpItem: $(row).find('td:eq(7)').text().trim(),
|
|
|
- coldChainItem: $(row).find('td:eq(8)').text().trim(),
|
|
|
- registeredItem: $(row).find('td:eq(9)').text().trim(),
|
|
|
- charityAidItem: $(row).find('td:eq(10)').text().trim(),
|
|
|
- packaging: $(row).find('td:eq(11)').text().trim(),
|
|
|
+ mdmCode: $(row).find('td:eq(1)').text(),
|
|
|
+ productName: $(row).find('td:eq(2)').text(),
|
|
|
+ genericName: $(row).find('td:eq(3)').text(),
|
|
|
+ specification: $(row).find('td:eq(4)').text(),
|
|
|
+ manufacturerShortName: $(row).find('td:eq(5)').text(),
|
|
|
+ administrationMethod: $(row).find('td:eq(6)').text(),
|
|
|
+ followUpItem: $(row).find('td:eq(7)').text(),
|
|
|
+ coldChainItem: $(row).find('td:eq(8)').text(),
|
|
|
+ registeredItem: $(row).find('td:eq(9)').text(),
|
|
|
+ charityAidItem: $(row).find('td:eq(10)').text(),
|
|
|
+ packaging: $(row).find('td:eq(11)').text(),
|
|
|
packageQuantity: $(row).find('input[name="packageQuantity"]').val(),
|
|
|
singleDoseValue: $(row).find('input[name="singleDoseValue"]').val(),
|
|
|
singleDoseUnit: $(row).find('select[name="singleDoseUnit"]').val(),
|
|
@@ -556,16 +555,28 @@ function initTab(datas){
|
|
|
function submitHandler() {
|
|
|
prescriptionNumber='';
|
|
|
drugsLinkId='';
|
|
|
- var prescribingDoctor = $('#prescribingDoctor').val();
|
|
|
- if (prescribingDoctor == ''|| prescribingDoctor == null|| prescribingDoctor == undefined){
|
|
|
- $.modal.alertError("请输入处方医生");
|
|
|
- return;
|
|
|
+
|
|
|
+ var hospital = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'hospital');
|
|
|
+ if (hospital.value === '') {
|
|
|
+ $.modal.alertWarning("请选择请选择医院!");
|
|
|
+ return null;
|
|
|
}
|
|
|
- var prescriptionIssueDate = $('#prescriptionIssueDate').val();
|
|
|
- if (prescriptionIssueDate == ''|| prescriptionIssueDate == null|| prescriptionIssueDate == undefined){
|
|
|
- $.modal.alertError("处方开具日期");
|
|
|
- return;
|
|
|
+ var prescribingDoctor = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescribingDoctor');
|
|
|
+ if (prescribingDoctor.value === '') {
|
|
|
+ $.modal.alertWarning("请输入处方医生!");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ var prescriptionDiagnosis = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescriptionDiagnosis');
|
|
|
+ if (prescriptionDiagnosis.value === '') {
|
|
|
+ $.modal.alertWarning("请填写处方诊断!");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ var prescriptionIssueDate = $("#dtp-form-newcfxx").serializeArray().find(item => item.name === 'prescriptionIssueDate');
|
|
|
+ if (prescriptionIssueDate.value === '') {
|
|
|
+ $.modal.alertWarning("请选择处方开具日期!");
|
|
|
+ return null;
|
|
|
}
|
|
|
+
|
|
|
// 创建一个 FormData 对象用于提交表单数据
|
|
|
var formData = new FormData();
|
|
|
// 如果有文件上传,例如处方图片和发票图片
|
|
@@ -586,6 +597,7 @@ function initTab(datas){
|
|
|
// 添加患者信息到 FormData
|
|
|
formData.append('patientId', patientObj.id);
|
|
|
formData.append('patientName', patientObj.name || '');
|
|
|
+ formData.append('patientPhone', patientObj.phoneNumber);
|
|
|
let gender = patientObj.gender; // 获取表单中的性别值
|
|
|
if (gender ===1) {
|
|
|
gender = 1; // 如果为空,则设置默认值为 '0'
|
|
@@ -627,11 +639,19 @@ function initTab(datas){
|
|
|
//formData.append('xlname', XL);
|
|
|
console.log("DL=" + DL);
|
|
|
//console.log("XL=" + XL);
|
|
|
- if(reviewFlag){
|
|
|
+ debugger
|
|
|
+ var reviewingNameInput = $('#pharmacistNameSelect option:selected');
|
|
|
+ if($.common.isEmpty(reviewingName) && reviewFlag){
|
|
|
+ reviewFlag=false;
|
|
|
+ $.modal.alertError("请完成药师审核或选择不开启审核");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(reviewFlag && $.common.isNotEmpty(reviewingName)){
|
|
|
formData.append('remarks', remarks);
|
|
|
formData.append('reviewingName', reviewingName);
|
|
|
formData.append('reviewStatus', reviewStatus);
|
|
|
formData.append('reviewFormData', reviewFormData);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
var tableRows = [];
|
|
@@ -639,17 +659,17 @@ function initTab(datas){
|
|
|
$('#drugInfoTable tbody tr').each(function(index, row) {
|
|
|
var rowData = {
|
|
|
productId: $(row).data('product-id'),
|
|
|
- mdmCode: $(row).find('td:eq(1)').text().trim(),
|
|
|
- productName: $(row).find('td:eq(2)').text().trim(),
|
|
|
- genericName: $(row).find('td:eq(3)').text().trim(),
|
|
|
- specification: $(row).find('td:eq(4)').text().trim(),
|
|
|
- manufacturerShortName: $(row).find('td:eq(5)').text().trim(),
|
|
|
- administrationMethod: $(row).find('td:eq(6)').text().trim(),
|
|
|
- followUpItem: $(row).find('td:eq(7)').text().trim(),
|
|
|
- coldChainItem: $(row).find('td:eq(8)').text().trim(),
|
|
|
- registeredItem: $(row).find('td:eq(9)').text().trim(),
|
|
|
- charityAidItem: $(row).find('td:eq(10)').text().trim(),
|
|
|
- packaging: $(row).find('td:eq(11)').text().trim(),
|
|
|
+ mdmCode: $(row).find('td:eq(1)').text(),
|
|
|
+ productName: $(row).find('td:eq(2)').text(),
|
|
|
+ genericName: $(row).find('td:eq(3)').text(),
|
|
|
+ specification: $(row).find('td:eq(4)').text(),
|
|
|
+ manufacturerShortName: $(row).find('td:eq(5)').text(),
|
|
|
+ administrationMethod: $(row).find('td:eq(6)').text(),
|
|
|
+ followUpItem: $(row).find('td:eq(7)').text(),
|
|
|
+ coldChainItem: $(row).find('td:eq(8)').text(),
|
|
|
+ registeredItem: $(row).find('td:eq(9)').text(),
|
|
|
+ charityAidItem: $(row).find('td:eq(10)').text(),
|
|
|
+ packaging: $(row).find('td:eq(11)').text(),
|
|
|
packageQuantity: $(row).find('input[name="packageQuantity"]').val(),
|
|
|
singleDoseValue: $(row).find('input[name="singleDoseValue"]').val(),
|
|
|
singleDoseUnit: $(row).find('select[name="singleDoseUnit"]').val(),
|
|
@@ -741,7 +761,9 @@ function initTab(datas){
|
|
|
prescriptionNumber = data.data.prescriptionNumber;
|
|
|
drugsLinkId = data.data.drugsLinkId;
|
|
|
$.modal.msg(data.msg);
|
|
|
- $.modal.closeTab();
|
|
|
+
|
|
|
+ $.modal.close();
|
|
|
+ $.modal.msgSuccessReload();
|
|
|
}else{
|
|
|
$.modal.alertError(data.data.msg);
|
|
|
}
|
|
@@ -1073,10 +1095,12 @@ function initTab(datas){
|
|
|
$("#query").val("");
|
|
|
}
|
|
|
function search_hz() {
|
|
|
- var query = $('#query').val().trim();
|
|
|
+ var query = $('#query').val();
|
|
|
// 如果输入为空,清空 dValueId 输入框并停止进一步操作
|
|
|
if (!query) {
|
|
|
$('#query').val('');
|
|
|
+ var tbody = $('#patient-table tbody');
|
|
|
+ tbody.empty(); // 清空现有行
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -1143,6 +1167,8 @@ function initTab(datas){
|
|
|
|
|
|
},
|
|
|
error: function(error) {
|
|
|
+ var tbody = $('#patient-table tbody');
|
|
|
+ tbody.empty(); // 清空现有行
|
|
|
// 清空 dValueId 输入框
|
|
|
$('#query').val('');
|
|
|
}
|