Index: ssts-web/src/main/webapp/dx-disinfectsystem/js/useRecord/record.js
===================================================================
diff -u -r24487 -r24495
--- ssts-web/src/main/webapp/dx-disinfectsystem/js/useRecord/record.js (.../record.js) (revision 24487)
+++ ssts-web/src/main/webapp/dx-disinfectsystem/js/useRecord/record.js (.../record.js) (revision 24495)
@@ -5,7 +5,7 @@
$("#modalTables").bootstrapTable('resetView');
});
//扫描条码
-(function KeyDow(){
+/*(function KeyDow(){
$('#tempBarcode').on('keydown',function(e){
if (e.keyCode == "13") {
$('#Hidden').val($(this).val())
@@ -34,7 +34,7 @@
}
});
-})();
+})();*/
//渲染主列表
$(function(){
var columnArray = [
@@ -254,40 +254,40 @@
title: '条码',
}, {
- field: 'name',
+ field: 'showTousseName',
title: '名称'
}, {
- field: 'Urgent',
+ field: 'isUrgentForUseRecord',
title: '加急'
}, {
- field: 'totla',
+ field: 'amount',
title: '数量'
},
{
- field: 'Packing',
+ field: 'packageType',
title: '包装类型'
},
{
- field: 'batch',
+ field: 'idCardUseAmount',
title: '批次'
},
{
- field: 'Expiration',
+ field: 'validUntil',
title: '失效日期'
},
{
field: 'Img',
title: '图片',
formatter: function (value,row,index){
- return ''+row.id+' 图片'
+ return ' 图片'
},
},
{
- field: 'Situation',
+ field: 'includeImplant',
title: '植入物是使用情况'
},
{
- field: 'price',
+ field: 'types',
title: '操作',
formatter:function (value,row,index){
return '删除'
@@ -307,59 +307,52 @@
strictSearch: true,
height: 140, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度
uniqueId: "id", //每一行的唯一标识,一般为主键列
- // showToggle: true, //是否显示详细视图和列表视图的切换按钮
- // cardView: false, //是否显示详细视图
detailView: false, //是否显示父子表
-
columns: [
{
checkbox: true
- },
- {
+ },{
field: 'barcode',
title: '条码',
formatter:function(value,row,index){
return ''+row.barcode+''
},
- },
- {
- field: 'name',
+
+ }, {
+ field: 'showTousseName',
title: '名称'
- },
- {
- field: 'Urgent',
+ }, {
+ field: 'isUrgentForUseRecord',
title: '加急'
- },
- {
- field: 'totla',
+ }, {
+ field: 'amount',
title: '数量'
},
{
- field: 'Packing',
+ field: 'packageType',
title: '包装类型'
},
{
- field: 'batch',
+ field: 'idCardUseAmount',
title: '批次'
},
{
- field: 'Expiration',
+ field: 'validUntil',
title: '失效日期'
},
{
field: 'Img',
title: '图片',
formatter: function (value,row,index){
- // console.log(index)
return ' 图片'
},
},
{
- field: 'Situation',
+ field: 'includeImplant',
title: '植入物是使用情况'
},
{
- field: 'operation',
+ field: 'types',
title: '操作',
formatter:function (value,row,index){
return '删除'
@@ -513,206 +506,6 @@
type:'get',
async:true,
dataType:'json',
- /*success:function(data){
- // console.log(data.data)
- var datas= data.data[0];
- str='
'+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
-
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- '
'+
- ''+
- ''+
- ''+
- ''+
-
- '
'+
- ''+
- ''+
- '
'+
-
- ''
- $('#user_li').html(str)
- //修改查询条码信息
- $.ajax({
- url:'data/barcode.php?barcode='+datas.barcode,
- type:'get',
- success:function(data){
- console.log(data.data)
- $('#Goods-table').bootstrapTable('load',data.data)
- }
- })
- }*/
success:function(data){
if(data.success===true){
var datas =data.data[0];
@@ -721,6 +514,7 @@
$('#washHandNurse').val(datas.washHandNurse);//洗手护士
$('#circuitNurse').val(datas.circuitNurse)//巡回护士
$('#depart').val(datas.depart)//科室
+ $('#depart').attr('disabled',true);
$('#operationRoom').val(datas.operationRoom)//手术间
$('#patientAge').val(datas.patientAge)//年纪
$('#Select').val();//性别
@@ -732,9 +526,9 @@
$('#specialInfection').val();//特殊感染类型
$('#operation').val(datas.operation);//手术名称
$('#operationScheduleId').val(datas.operationScheduleId);//手术单号
- $('#operationTime').val(datas.operationTime);//手术时间
+ $('#operationTime').val(datas.operationTimeStr);//手术时间
$('#visitId').val(datas.visitId);//住院次数
- $('#enteringTime').val(); // enteringDateStr录入时间
+ $('#enteringTime').val(datas.enteringDateStr); // enteringDateStr录入时间
$('#operator').val(datas.operator);//录入人
$('#reviewer').val() // 缺审核人
$('#applicationTime').val(datas.applicationTimeStr);// 申请时间
@@ -804,6 +598,27 @@
}
})
//添加使用记录
+$('#tempBarcode').on('keydown',function(e){
+ if (e.keyCode == "13") {
+ if($(this).val()==""){
+ alert('请输入条码')
+ return false;
+ }else{
+ $.ajax({
+ url:WWWROOT+'/disinfectSystem/useRecord/useRecordController/loadScanedGoods.mhtml?barcode='+$(this).val(),
+ type:'get',
+ dataType:'json',
+ async:false,
+ success:function(data){
+ if(data.success===true){
+ $('#addGoods-table').bootstrapTable('append',data);
+ }
+ }
+
+ })
+ }
+ }
+})
$('#mymodal').click(function(){
var addhospitalNum = $('#addhospitalNum').val();//住院号
var addtreatmentNum =$('#addtreatmentNum').val();//诊疗号
@@ -831,6 +646,27 @@
var addreviewTime =$('#addreviewTime').val();//审核时间
var addpatientName =$('#addpatientName').val();//姓名
var tempBarcode =$('#tempBarcode').val();//机械报信息
+ var recordGoodsArray = [];//[{"containerBarcode":"01","children":["001","002"]}, {"containerBarcode":"02","children":["003","004"]} , {"tousseInstanceBarcode":"003"}]
+ var allTableData = $('#addGoods-table').bootstrapTable('getData');
+
+ for(var i=0;i 0){
+ objConservation.containerBarcode = data.barcode;
+ var tousseBarcodeArray = [];
+ for (var j = 0; j < data.children.length; j++) {
+ tousseBarcodeArray.push(data.children[j].barcode);
+ }
+ objConservation.children = tousseBarcodeArray;
+ recordGoodsArray.push(objConservation);
+ }else{
+ objConservation.tousseInstanceBarcode = data.barcode;
+ recordGoodsArray.push(objConservation);
+ }
+ }
+ var recordGoodsArray= JSON.stringify(recordGoodsArray)
+ console.log(recordGoodsArray)
if(addhospitalNum==''&&addtreatmentNum==''&&addpatientName==''){
$('#Alert').html('x请输入诊疗号或者住院号或者病人姓名')
$ ('#Alert').show ().delay (1500).fadeOut ();