pharmacy-com.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * 加载药品搜索窗口
  3. */
  4. function initDrugSearchList() {
  5. var settings = {
  6. placement: 'bottom-right',//值: auto,top,right,bottom,left,top-right,top-left,bottom-right,bottom-left 要显示的位置
  7. trigger: 'click', //值:click,hover 触发方式
  8. content: '',//内容,内容可以是函数
  9. width: '600',
  10. //arrow:false,//是否显示箭头
  11. multi: true,//在页面允许其他弹出层
  12. closeable: true,//显示关闭按钮
  13. style: '', //值:'',inverse
  14. delay: 300,//延迟时间, 悬浮属性才执行
  15. padding: true,//内容填充
  16. height: '200',
  17. //offsetTop:10,
  18. cache: true,//如果缓存设置为false,则popover将销毁并重新创建
  19. };
  20. //药品弹窗
  21. settings.content = '<div id="medicinePopoverContent"><table id="tb_table_medicine"></table></div>';
  22. $('#searchText').webuiPopover('destroy').webuiPopover(settings);
  23. }
  24. /**
  25. * 修改列数据
  26. * @param $table 表格元素
  27. * @param index 行索引
  28. * @param field 列名
  29. * @param value cell值
  30. */
  31. function saveCellData($table, index, field, value) {
  32. $table.bootstrapTable('updateCell', {
  33. index: index,
  34. field: field,
  35. value: value
  36. })
  37. }