|
@@ -24,14 +24,18 @@ $(function () {
|
|
|
initSearchList('<div id="medicinePopoverContent"><table id="tb_table_medicine"></table></div>',
|
|
|
'searchTextEff', 600, 200);
|
|
|
$('#searchTextEff').on('input focus', function (e) {
|
|
|
+ if ($('#searchTextEff').val().length == 0) {
|
|
|
+ $('#chargeCode').val("");
|
|
|
+ }
|
|
|
+ let data ={
|
|
|
+ searchText: $("#searchTextEff").val() == "" ? null : $("#searchTextEff").val(),
|
|
|
+ groupNo: $("#groupNoSearchText").val()[0],
|
|
|
+ delFlag: 0
|
|
|
+ };
|
|
|
showDrugPopover({
|
|
|
- method: 'POST',
|
|
|
- data: JSON.stringify({
|
|
|
- searchText: $("#searchTextEff").val() == "" ? null : $("#searchTextEff").val(),
|
|
|
- groupNo: $("#groupNoSearchText").val(),
|
|
|
- delFlag: 0
|
|
|
- }),
|
|
|
- url: '/thmz/'+($("#groupNoSearchText").val()>=61?'getYpBaseYfLike':'getYpZdDictBase'),
|
|
|
+ method: ($("#groupNoSearchText").val()>=61?'GET':'POST'),
|
|
|
+ data: $("#groupNoSearchText").val()>=61?data:JSON.stringify(data),
|
|
|
+ url: '/thmz/'+($("#groupNoSearchText").val()[0]>=61?'getYpBaseYfLike':'getYpZdDictBase'),
|
|
|
columns: [
|
|
|
{
|
|
|
field: 'stockAmount',
|
|
@@ -41,6 +45,9 @@ $(function () {
|
|
|
}],
|
|
|
onClickRow: function (row, $element) {
|
|
|
$('#searchTextEff').webuiPopover('hide');
|
|
|
+ $("#searchTextEff").val(row.name);
|
|
|
+ $("#chargeCode").val(row.code);
|
|
|
+ initEffDateTable();
|
|
|
}
|
|
|
});
|
|
|
});
|
|
@@ -48,7 +55,7 @@ $(function () {
|
|
|
exportExcel();
|
|
|
});
|
|
|
$('#btn_eff_date').on('click',function(e){
|
|
|
- $("#pharmacyModal").modal("show");
|
|
|
+ $("#effModal").modal("show");
|
|
|
initEffDateTable()
|
|
|
});
|
|
|
});
|
|
@@ -154,25 +161,25 @@ function getChildCom(node){
|
|
|
/**
|
|
|
* 校期列表
|
|
|
*/
|
|
|
-function initEffDateTable(chargeCode) {
|
|
|
+function initEffDateTable() {
|
|
|
$('#eff_table').bootstrapTable('destroy');
|
|
|
$('#eff_table').bootstrapTable({
|
|
|
url: '/thmz/getYpInDetlYfEffDate', //请求后台的URL(*)
|
|
|
method: 'GET', //请求方式(*)
|
|
|
- toolbar: '#toolbar', //工具按钮用哪个容器
|
|
|
striped: true, //是否显示行间隔色
|
|
|
cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
pagination: true, //是否显示分页(*)
|
|
|
sortable: true, //是否启用排序
|
|
|
sortOrder: "asc", //排序方式
|
|
|
queryParams: {
|
|
|
- chargeCode: chargeCode,
|
|
|
- groupNo: $("#groupNoSearchText").val()
|
|
|
+ chargeCode: isEmpty($("#chargeCode").val())?null:$("#chargeCode").val(),
|
|
|
+ groupNo: $("#groupNoSearchText").val()[0],
|
|
|
+ effMonth: $("#effMonthSearch").val()
|
|
|
}, //传递参数(*)
|
|
|
- sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
|
|
|
+ sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
|
|
|
pageNumber: 1, //初始化加载第一页,默认第一页
|
|
|
- pageSize: 15, //每页的记录行数(*)
|
|
|
- pageList: [15, 20, 30, 50], //可供选择的每页的行数(*)
|
|
|
+ pageSize: 10, //每页的记录行数(*)
|
|
|
+ pageList: [10, 20, 30, 50], //可供选择的每页的行数(*)
|
|
|
search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
|
|
|
strictSearch: true,
|
|
|
showColumns: false, //是否显示所有的列
|
|
@@ -196,80 +203,55 @@ function initEffDateTable(chargeCode) {
|
|
|
align: "center",
|
|
|
valign: 'middle'
|
|
|
},{
|
|
|
- field: 'location',
|
|
|
+ field: 'xq',
|
|
|
title: '校期',
|
|
|
align: "center",
|
|
|
- width: 80,
|
|
|
valign: 'middle'
|
|
|
}, {
|
|
|
- field: 'code',
|
|
|
+ field: 'inDate',
|
|
|
title: '入库日期',
|
|
|
align: "center",
|
|
|
- width: 50,
|
|
|
- valign: 'middle'
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return value == null ? "-" : format(value, "yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
}, {
|
|
|
- field: 'code',
|
|
|
+ field: 'chargeCode',
|
|
|
title: '药品编码',
|
|
|
align: "left",
|
|
|
- width: 150,
|
|
|
valign: 'middle'
|
|
|
}, {
|
|
|
field: 'name',
|
|
|
title: '药品名',
|
|
|
align: "left",
|
|
|
- width: 150,
|
|
|
valign: 'middle'
|
|
|
},
|
|
|
{
|
|
|
- field: 'stockAmountMz',
|
|
|
+ field: 'specification',
|
|
|
title: '规格',
|
|
|
align: "center",
|
|
|
- valign: 'middle',
|
|
|
- width: 80,
|
|
|
- visible: isMultiple==0?false:true,
|
|
|
- formatter: function (value, row, index) {
|
|
|
- return Math.floor(value * 100) / 100;
|
|
|
- },
|
|
|
- cellStyle:function (value, row, index) {
|
|
|
- if(row.visibleFlagMz == 0){
|
|
|
- return {css:{background:'red'}};
|
|
|
- }
|
|
|
- return {css:{}};
|
|
|
- }
|
|
|
+ valign: 'middle'
|
|
|
},
|
|
|
{
|
|
|
- field: 'stockAmountZy',
|
|
|
+ field: 'effDate',
|
|
|
title: '有效期',
|
|
|
align: "center",
|
|
|
valign: 'middle',
|
|
|
- width: 80,
|
|
|
- visible: isMultiple==0?false:true,
|
|
|
formatter: function (value, row, index) {
|
|
|
- return Math.floor(value * 100) / 100;
|
|
|
- },
|
|
|
- cellStyle:function (value, row, index) {
|
|
|
- if(row.visibleFlagMz == 0){
|
|
|
- return {css:{background:'red'}};
|
|
|
- }
|
|
|
- return {css:{}};
|
|
|
+ return value == null ? "-" : format(value, "yyyy-MM-dd");
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- field: 'stockAmountDz',
|
|
|
+ field: 'manufactoryName',
|
|
|
title: '生产厂商',
|
|
|
align: "center",
|
|
|
- valign: 'middle',
|
|
|
- width: 80,
|
|
|
- visible: isMultiple==0?false:true,
|
|
|
- formatter: function (value, row, index) {
|
|
|
- return Math.floor(value * 100) / 100;
|
|
|
- }
|
|
|
+ valign: 'middle'
|
|
|
}
|
|
|
],
|
|
|
rowStyle: function (row, index) {
|
|
|
- if (isMultiple == 0 && row.visibleFlagMz == 1 && row.visibleFlagZy == 1) {
|
|
|
+ /*if (isMultiple == 0 && row.visibleFlagMz == 1 && row.visibleFlagZy == 1) {
|
|
|
return { css: { 'background-color': 'red' } };
|
|
|
- }
|
|
|
+ }*/
|
|
|
return {css:{}}
|
|
|
},
|
|
|
responseHandler: function (res) {
|
|
@@ -579,6 +561,12 @@ function initTable(classCode) {
|
|
|
}
|
|
|
return {css:{}}
|
|
|
},
|
|
|
+ onDblClickRow: function (row) {
|
|
|
+ $("#effModal").modal("show");
|
|
|
+ $("#chargeCode").val(row.code);
|
|
|
+ $("#searchTextEff").val(row.name);
|
|
|
+ initEffDateTable();
|
|
|
+ },
|
|
|
responseHandler: function (res) {
|
|
|
if (res == '401' || res == 401) {
|
|
|
window.location.href = '/thmz/login/view'
|
|
@@ -592,7 +580,6 @@ function initTable(classCode) {
|
|
|
"rows": {} //数据
|
|
|
};
|
|
|
}
|
|
|
-
|
|
|
return {
|
|
|
"total": ress.total,//总页数
|
|
|
"rows": ress.data //数据
|
|
@@ -650,6 +637,34 @@ function resetVirtual() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 修改有限期显示状态
|
|
|
+ */
|
|
|
+function saveEff(){
|
|
|
+ var row = $("#eff_table").bootstrapTable('getSelections');
|
|
|
+ if(row.length < 1){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var datas = [];
|
|
|
+ var i = 0;
|
|
|
+ row.forEach(function (item, index, arr) {
|
|
|
+ var tem = {
|
|
|
+ "inDocuNo": item.inDocuNo,
|
|
|
+ "inSeri": item.inSeri
|
|
|
+ }
|
|
|
+ datas[i] = tem;
|
|
|
+ i++
|
|
|
+ });
|
|
|
+ request({
|
|
|
+ url: '/updateEffDelFlag',
|
|
|
+ method: 'POST',
|
|
|
+ data: JSON.stringify(datas)
|
|
|
+ }).then((res) => {
|
|
|
+ successMesage(res);
|
|
|
+ initEffDateTable();
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 导出excel
|
|
|
*/
|