|
@@ -253,6 +253,32 @@ function sendRefundButtonChange(object, realIndex) {
|
|
|
function sendMedicineProcessing(realNo, orderNo, receiptNo, times, patientId, name) {
|
|
|
$("#sendDispose").attr("disabled", true);
|
|
|
$("#sendDrug").attr("disabled", true);
|
|
|
+
|
|
|
+ // 收集药品追溯码数据
|
|
|
+ let tableData = $("#tb_table_right").bootstrapTable('getData');
|
|
|
+ let drugTracCodgData = [];
|
|
|
+ for (let i = 0; i < tableData.length; i++) {
|
|
|
+ if (!isEmpty(tableData[i].drugTracCodg)) {
|
|
|
+ drugTracCodgData.push({
|
|
|
+ drugTracCodg: tableData[i].drugTracCodg,
|
|
|
+ patientId: tableData[i].patientId,
|
|
|
+ times: tableData[i].times,
|
|
|
+ receiptNo: tableData[i].receiptNo,
|
|
|
+ orderNo: tableData[i].orderNo,
|
|
|
+ itemNo: tableData[i].itemNo,
|
|
|
+ chargeItemCode: tableData[i].chargeItemCode,
|
|
|
+ serial: tableData[i].serial,
|
|
|
+ groupNo: tableData[i].groupNo,
|
|
|
+ realNo: tableData[i].realNo,
|
|
|
+ specification: tableData[i].specification,
|
|
|
+ drugName: tableData[i].drugname,
|
|
|
+ abbrName: tableData[i].abbrName,
|
|
|
+ unitPrice: tableData[i].unitPrice,
|
|
|
+ flag: '0'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
var temp = {
|
|
|
winNo: winNo,
|
|
|
mzChargeDetail: {
|
|
@@ -264,7 +290,8 @@ function sendMedicineProcessing(realNo, orderNo, receiptNo, times, patientId, na
|
|
|
patientId: patientId,
|
|
|
name: name,
|
|
|
windowsNoYf: winNo
|
|
|
- }
|
|
|
+ },
|
|
|
+ drugTracCodgList: drugTracCodgData // 添加药品追溯码数据
|
|
|
};
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
@@ -1360,7 +1387,7 @@ function prescriptionDetail(realNo, orderNo, receiptNo, times, patientId, confir
|
|
|
return '<span style="color: red">麻</span>'
|
|
|
} else if (value == 3) {
|
|
|
return '<span style="color: red">精神1</span>'
|
|
|
- } else if (value == 3) {
|
|
|
+ } else if (value == 4) {
|
|
|
return '<span style="color: red">精神2</span>'
|
|
|
} else {
|
|
|
return '<span style="color: red">-</span>'
|
|
@@ -1389,7 +1416,34 @@ function prescriptionDetail(realNo, orderNo, receiptNo, times, patientId, confir
|
|
|
return value == null ? "-" : value;
|
|
|
}
|
|
|
}
|
|
|
+ , {
|
|
|
+ field: 'drugTracCodg',
|
|
|
+ title: '药品追溯码',
|
|
|
+ width: '270',
|
|
|
+ align: "left",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return isEmpty(value)?'':value
|
|
|
+ }
|
|
|
+ }
|
|
|
],
|
|
|
+ /**
|
|
|
+ * @param {点击列的 field 名称} field
|
|
|
+ * @param {点击列的 value 值} value
|
|
|
+ * @param {点击列的整行数据} row
|
|
|
+ * @param {td 元素} $element
|
|
|
+ */
|
|
|
+ onClickCell: function (field, value, row, $element) {
|
|
|
+ if (field === 'drugTracCodg') {
|
|
|
+ $element.attr('contenteditable', true);
|
|
|
+ $element.focus();
|
|
|
+ $element.blur(function () {
|
|
|
+ let index = $element.parent().data('index');
|
|
|
+ let tdValue = $element.html();
|
|
|
+ saveCellData($('#tb_table_right'), index, field, tdValue);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
responseHandler: function (res) {
|
|
|
if (res == '401' || res == 401) {
|
|
|
window.location.href = '/thmz/login/view'
|
|
@@ -2587,4 +2641,46 @@ function requestAs (url, method, data = {},async, contentType, back){
|
|
|
return typeof back == "function" && back(null);
|
|
|
}
|
|
|
});
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 新的requestAs函数,用于药品追溯码功能
|
|
|
+ * @param url 请求URL
|
|
|
+ * @param method 请求方法
|
|
|
+ * @param data 请求数据
|
|
|
+ * @param async 是否异步
|
|
|
+ * @param contentType 内容类型
|
|
|
+ * @param back 回调函数
|
|
|
+ */
|
|
|
+function requestAsNew (url, method, data = {},async, contentType, back){
|
|
|
+ $.ajax({
|
|
|
+ type: method,
|
|
|
+ url: url,
|
|
|
+ contentType: contentType,
|
|
|
+ dataType: "json",
|
|
|
+ async: async,
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: data,
|
|
|
+ success: function (res) {
|
|
|
+ back(res);
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ back(null);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 保存单元格数据
|
|
|
+ * @param table 表格对象
|
|
|
+ * @param index 行索引
|
|
|
+ * @param field 字段名
|
|
|
+ * @param value 新值
|
|
|
+ */
|
|
|
+function saveCellData(table, index, field, value) {
|
|
|
+ table.bootstrapTable('updateCell', {
|
|
|
+ index: index,
|
|
|
+ field: field,
|
|
|
+ value: value
|
|
|
+ });
|
|
|
}
|