|
|
@@ -16,6 +16,39 @@ $(function () {
|
|
|
$('#searchText').on('blur',function(e){
|
|
|
loadTbTable();
|
|
|
});
|
|
|
+
|
|
|
+ //初始化药品查询弹出框
|
|
|
+ initSearchList('<div id="medicinePopoverContent"><table id="tb_table_medicine"></table></div>',
|
|
|
+ 'drugSearchText', 600, 200);
|
|
|
+ $('#drugSearchText').on('input focus',function(e){
|
|
|
+ showDrugPopover({
|
|
|
+ url: '/thmz/getYpBaseYfLike',
|
|
|
+ data:{
|
|
|
+ groupNo: pharmacyGroupNo,
|
|
|
+ searchText: $("#drugSearchText").val() == "" ? null : $("#drugSearchText").val(),
|
|
|
+ },
|
|
|
+ columns: [{
|
|
|
+ field: 'stockAmount',
|
|
|
+ title: '药房库存',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return value<=0?'<span style="color: red">'+value+'</span>':value;
|
|
|
+ }
|
|
|
+ }],
|
|
|
+ onClickRow: function (row, $element) {
|
|
|
+ $('#drugSearchText').webuiPopover('hide');
|
|
|
+ $('#drugSearchText').val(row.name);
|
|
|
+ $('#chargeCode').val(row.code);
|
|
|
+ loadTbTable();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $('#drugSearchText').on('change', function (e) {
|
|
|
+ if (isEmpty($('#drugSearchText').val())) {
|
|
|
+ $('#chargeCode').val('');
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
|
|
|
@@ -48,7 +81,7 @@ function initTable() {
|
|
|
cellEdit: true,
|
|
|
cellsubmit: "remote",
|
|
|
cellurl: '/thmz/modifYpSpecialMark',
|
|
|
- colNames: ['门诊停用','住院停用','库存为零','处方限制天数','编码','序号', '药品名','厂家', '库存量', '大规格(汇总)', '规格', '虚存2','启用虚存2', '3天用量', '7天用量', '14天用量','30天用量','货位号','药性分类'],
|
|
|
+ colNames: ['门诊停用','住院停用','库存为零','处方限制天数','月限购量','编码','序号', '药品名','厂家', '库存量', '大规格(汇总)', '规格', '虚存2','启用虚存2', '3天用量', '7天用量', '14天用量','30天用量','货位号','药性分类'],
|
|
|
colModel: [
|
|
|
{name: 'visibleFlagMz', index: 'visibleFlagMz',align:'center',width:100,formatter : "checkbox",editable : true,edittype:'checkbox', editoptions:{value:"1:0"}},
|
|
|
{name: 'visibleFlagZy', index: 'visibleFlagZy',align:'center',width:100,formatter : "checkbox",editable : true,edittype:'checkbox', editoptions:{value:"1:0"}},
|
|
|
@@ -56,12 +89,18 @@ function initTable() {
|
|
|
{name: 'prescriptionLimitDays', index: 'prescriptionLimitDays',width:100,align:'center',editable : true,edittype:'text'
|
|
|
,editrules: {edithidden:false,number:true,minValue:0}
|
|
|
},
|
|
|
+ {name: 'mzRestrict', index: 'mzRestrict',width:100,align:'center',editable : true,edittype:'text'
|
|
|
+ ,editrules: {edithidden:false,number:true,minValue:0}
|
|
|
+ },
|
|
|
{name: 'chargeCode', index: 'chargeCode',align:'center',width:100},
|
|
|
{name: 'serial', index: 'serial',align:'center',width:100,hidden:true},
|
|
|
{name: 'name', index: 'name',width:180},
|
|
|
{name: 'manufactoryName', index: 'manufactoryName',width:180},
|
|
|
{name: 'stockAmount', index: 'stockAmount',align:'center',width:100},
|
|
|
- {name: 'stockAmountLarge', index: 'stockAmountLarge',align:'center',width:100},
|
|
|
+ {name: 'stockAmountLarge', index: 'stockAmountLarge',align:'center',width:100,
|
|
|
+ formatter: function (cellvalue, options, rowObject) {
|
|
|
+ return keepTwoDecimal(cellvalue)
|
|
|
+ }},
|
|
|
{name: 'specification', index: 'specification',align:'center',width:100},
|
|
|
{name: 'stockAmountVirtual2', index: 'stockAmountVirtual2',width:100,align:'center',editable : true,edittype:'text'
|
|
|
,editrules: {edithidden:true,number:true,minValue:0}
|
|
|
@@ -89,6 +128,14 @@ function initTable() {
|
|
|
if(cellname !== 'prescriptionLimitDays'){
|
|
|
temp.prescriptionLimitDays = record.prescriptionLimitDays;
|
|
|
}
|
|
|
+ if(cellname === 'mzRestrict' && value == 0){
|
|
|
+ if (!confirm("确定放开当前药品的月限购量吗?")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(cellname !== 'mzRestrict'){
|
|
|
+ temp.mzRestrict = record.mzRestrict;
|
|
|
+ }
|
|
|
temp.chargeCode = record.chargeCode;
|
|
|
temp.serial = record.serial;
|
|
|
temp.groupNo = pharmacyGroupNo;
|
|
|
@@ -117,7 +164,7 @@ function initTable() {
|
|
|
function loadTbTable() {
|
|
|
$("#tb_table").jqGrid('setGridParam', {
|
|
|
datatype:'json',
|
|
|
- postData: { searchText: $("#searchText").val(), groupNo: pharmacyGroupNo }
|
|
|
+ postData: { chargeCode: $("#chargeCode").val(), groupNo: pharmacyGroupNo }
|
|
|
}).trigger('reloadGrid');
|
|
|
}
|
|
|
|