소스 검색

科室药品出入库开发

WANGJIALIANG 2 년 전
부모
커밋
1789f8d9a1

+ 14 - 0
src/main/java/cn/hnthyy/thmz/controller/NavigationController.java

@@ -1369,4 +1369,18 @@ public class NavigationController {
         }
         return "yk/drug_stock_up_down";
     }
+
+    /**
+     * 科室药品入出库
+     *
+     * @return
+     */
+    @RequestMapping("/drug-delivery-dept")
+    public String drugDeliveryDept(HttpServletRequest httpServletRequest) throws Exception {
+        List<String> urls = getRoleUrls(httpServletRequest);
+        if (!urls.contains("/thmz/drug-delivery-dept")) {
+            throw new Exception("您没有此模块的权限,请联系管理员开通!");
+        }
+        return "yf/drug_delivery_dept";
+    }
 }

+ 167 - 0
src/main/java/cn/hnthyy/thmz/controller/yf/YfYpOutDetlController.java

@@ -0,0 +1,167 @@
+package cn.hnthyy.thmz.controller.yf;
+
+import cn.hnthyy.thmz.Utils.TokenUtil;
+import cn.hnthyy.thmz.comment.UserLoginToken;
+import cn.hnthyy.thmz.entity.his.yp.YpOutDetlYf;
+import cn.hnthyy.thmz.entity.thmz.User;
+import cn.hnthyy.thmz.service.his.mz.EmployeeService;
+import cn.hnthyy.thmz.service.his.yf.YpOutDetlYfService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description:科室药品出入库
+ * @author: WANGJIALIANG
+ * @time: 2022/12/27 11:35
+ */
+@RestController
+@Slf4j
+public class YfYpOutDetlController {
+
+    @Autowired
+    private YpOutDetlYfService ypOutDetlYfService;
+    @Autowired
+    private EmployeeService employeeService;
+
+    /**
+     * 保存出库记录
+     *
+     * @param map
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/saveYpOutDetlYfList", method = {RequestMethod.POST})
+    public Map<String, Object> saveYpOutDetlYfList(@RequestBody Map<String, Object> map, HttpServletRequest httpServletRequest) {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            if (map == null || map.size() == 0) {
+                resultMap.put("code", -1);
+                resultMap.put("message", "保存出库记录信息失败,参数为空");
+                return resultMap;
+            }
+            User user = TokenUtil.getUser(httpServletRequest);
+            ypOutDetlYfService.saveYpOutDetlYfList(map, user.getUserIdCode());
+            resultMap.put("code", 0);
+            resultMap.put("message", "保存出库记录信息成功");
+            return resultMap;
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("系统异常,错误信息{}", e);
+            resultMap.put("code", -1);
+            resultMap.put("message", "保存出库记录信息失败,"+e.getMessage());
+            return resultMap;
+        }
+    }
+
+
+    /**
+     * 获取药房出库记录
+     * @param drawNo
+     * @param beginDate
+     * @param endDate
+     * @param groupNo
+     * @param confirmFlag
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/queryYpOutDetlYfRecord",method = {RequestMethod.GET})
+    public Map<String,Object> queryYpOutDetlYfRecord(@RequestParam("drawNo") String drawNo, @RequestParam(value = "beginDate")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date beginDate,
+                                                     @RequestParam(value = "endDate")@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDate,
+                                                     @RequestParam("groupNo") String groupNo, @RequestParam("confirmFlag") String confirmFlag) {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            if(StringUtils.isBlank(groupNo)){
+                resultMap.put("code", -1);
+                resultMap.put("message", "查询药房出库记录失败,药房编码为空");
+                return resultMap;
+            }
+            if(StringUtils.isNotBlank(drawNo)){
+                beginDate = null;
+                endDate = null;
+            }else{
+                drawNo = null;
+            }
+            List<YpOutDetlYf> ypOutDetlYfs = ypOutDetlYfService.getYpOutDetlYfRecord(drawNo, beginDate, endDate, groupNo, confirmFlag);
+            resultMap.put("code", 0);
+            resultMap.put("data", ypOutDetlYfs);
+            resultMap.put("message", "查询药房出库记录成功");
+            return resultMap;
+        } catch (Exception e) {
+            log.error(e.toString());
+            resultMap.put("code", -1);
+            resultMap.put("message", "查询药房出库记录失败");
+            return resultMap;
+        }
+    }
+
+
+    /**
+     * 查询出库单药品详细(药房)
+     *
+     * @param drawNo 出库单号
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/getYpOutDetlDrugYf", method = {RequestMethod.GET})
+    public Map<String, Object> getYpOutDetlDrugYf(@RequestParam("drawNo") String drawNo) {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            if (StringUtils.isBlank(drawNo)) {
+                resultMap.put("code", -1);
+                resultMap.put("message", "查询出库单药品失败,单号为空");
+                return resultMap;
+            }
+            List<YpOutDetlYf> ypOutDetlVos = ypOutDetlYfService.getYpOutDetlYfDetl(drawNo);
+            resultMap.put("code", 0);
+            resultMap.put("message", "查询请领单药品成功");
+            resultMap.put("data", ypOutDetlVos);
+            return resultMap;
+        } catch (Exception e) {
+            log.error(e.toString());
+            resultMap.put("code", -1);
+            resultMap.put("message", "查询请领单药品失败");
+            return resultMap;
+        }
+    }
+
+
+    /**
+     * 审核出库
+     *
+     * @param drawNo
+     * @return
+     */
+    @UserLoginToken
+    @RequestMapping(value = "/auditYpOutDetlYf", method = {RequestMethod.GET})
+    public Map<String, Object> auditYpOutDetlYf(@RequestParam("drawNo") String drawNo, HttpServletRequest httpServletRequest) {
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            if (StringUtils.isBlank(drawNo)) {
+                resultMap.put("code", -1);
+                resultMap.put("message", "审核出库信息失败,参数为空");
+                return resultMap;
+            }
+            User user = TokenUtil.getUser(httpServletRequest);
+            ypOutDetlYfService.auditYpOutDetlYf(drawNo, user.getUserIdCode());
+            resultMap.put("code", 0);
+            resultMap.put("message", "审核出库信息成功");
+            return resultMap;
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("系统异常,错误信息{}", e.getMessage());
+            resultMap.put("code", -1);
+            resultMap.put("message", e.getMessage());
+            return resultMap;
+        }
+    }
+
+}

+ 29 - 1
src/main/java/cn/hnthyy/thmz/entity/his/yp/YpOutDetlYf.java

@@ -98,7 +98,7 @@ public class YpOutDetlYf {
 	 */
   private Date confirmDate;
 	/**
-	 * 当前库存
+	 * 出库后库存
 	 */
   private double stockAmount;
 	/**
@@ -143,4 +143,32 @@ public class YpOutDetlYf {
 	 * 实盘数量 (药房盘点用)
 	 */
 	private double currStockAmount;
+    /**
+     * 审核人姓名
+     */
+    private String confirmName;
+    /**
+     * 请领人姓名
+     */
+    private String drawerName;
+    /**
+     * 经发人姓名
+     */
+    private String keeperName;
+    /**
+     * 领药科室
+     */
+    private String deptName;
+    /**
+     * 药品名称
+     */
+    private String name;
+    /**
+     * 药品规格
+     */
+    private String specification;
+    /**
+     * 生产厂家
+     */
+    private String manufactoryName;
 }

+ 3 - 2
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpBaseYfMapper.java

@@ -110,6 +110,7 @@ public interface YpBaseYfMapper {
      * @param chargeCode
      * @param serial
      * @param groupNo
+     * @param visibleFlagMz
      * @return
      */
     @Select({"<script>",
@@ -176,7 +177,7 @@ public interface YpBaseYfMapper {
      * @param groupNo
      * @return
      */
-    @Select("  SELECT top 30 a.charge_code as code,   " +
+    @Select("  SELECT a.charge_code as code,   " +
             "         a.serial,   " +
             "         a.stock_amount,   " +
             "         a.pack_retprice,   " +
@@ -195,7 +196,7 @@ public interface YpBaseYfMapper {
             "          a.charge_code like '${searchText}%' or" +
             "          b.name like '${searchText}%') and" +
             "          a.group_no = #{groupNo} and " +
-            "          a.stock_amount > 0")
+            "          isnull(b.del_flag,0) != 1")
     List<YpZdDictVo> selectYpBaseYfLike(@Param("searchText") String searchText, @Param("groupNo") String groupNo);
 
     /**

+ 33 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpOutDetlYfMapper.java

@@ -163,4 +163,37 @@ public interface YpOutDetlYfMapper {
      */
     @Select("select out_amt,stock_amount,group_no,charge_code,serial,draw_no,pack_retprice from yp_out_detl_yf where draw_no=#{drawNo} and out_amt !=0 " )
     List<YpOutDetlYf> selectDifferenceData(@Param("drawNo") String drawNo);
+
+    /**
+     * 查询出库单详细
+     * @param drawNo
+     * @return
+     */
+    @Select("select out_date, out_seri, in_draw_no, in_seri, manu_no, draw_no, draw_yf, dept_code, charge_code, serial, pack_retprice, out_amt, drawer, keeper, eff_date, out_type, acct_type, acct_id, acct_date, confirm_id, confirm_flag, confirm_date, stock_amount, fix_price, group_no, group_no_out, buy_price, input_id, sys_date, serial_th, amount_th, comment from yp_out_detl_yf where draw_no=#{drawNo} and out_amt !=0 " )
+    List<YpOutDetlYf> selectYpOutDetlYfDetl(@Param("drawNo") String drawNo);
+
+    /**
+     * 查询药房出库药品到科室记录
+     * @param drawNo
+     * @return
+     */
+    @Select({"<script>" +
+            "SELECT distinct a.out_date,a.out_type,a.dept_code,a.draw_no,a.drawer,a.keeper,a.confirm_id," +
+            "a.confirm_date,confirm_flag = isnull(a.confirm_flag,'0'),a.acct_id,a.acct_date " +
+            "FROM yp_out_detl_yf a " +
+            "where out_type not in('6','7','8') " +
+            "<when test='beginDate!=null'>",
+            " and out_date &gt;=#{beginDate} ",
+            "</when>",
+            "<when test='endDate!=null'>",
+            " and out_date &lt;=#{endDate} ",
+            "</when>",
+            "<when test='drawNo!=null'>",
+            " and draw_no =#{drawNo} ",
+            "</when>",
+            " and confirm_flag =#{confirmFlag} ",
+            " and a.group_no = #{groupNo}" +
+            "</script>" })
+    List<YpOutDetlYf> selectYpOutDetlYfRecord(@Param("drawNo") String drawNo,@Param("beginDate") Date beginDate, @Param("endDate") Date endDate,
+                                              @Param("groupNo") String groupNo, @Param("confirmFlag") String confirmFlag);
 }

+ 51 - 0
src/main/java/cn/hnthyy/thmz/service/his/yf/YpOutDetlYfService.java

@@ -0,0 +1,51 @@
+package cn.hnthyy.thmz.service.his.yf;
+
+import cn.hnthyy.thmz.entity.MzException;
+import cn.hnthyy.thmz.entity.his.yp.YpOutDetlYf;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description:药房药品出库接口
+ * @author: WANGJIALIANG
+ * @time: 2022/12/27 09:47
+ */
+public interface YpOutDetlYfService {
+
+    /**
+     * 保存药房药品出库信息
+     * @param map
+     * @param userId
+     * @return
+     * @throws MzException
+     */
+    int saveYpOutDetlYfList(Map<String,Object> map, String userId)throws MzException;
+
+    /**
+     * 查询药房药品出库记录
+     * @param beginDate
+     * @param endDate
+     * @param groupNo
+     * @param confirmFlag
+     * @return
+     */
+    List<YpOutDetlYf> getYpOutDetlYfRecord(String drawNo,Date beginDate, Date endDate, String groupNo, String confirmFlag);
+
+    /**
+     * 查询出库单详细
+     * @param drawNo
+     * @return
+     */
+    List<YpOutDetlYf> getYpOutDetlYfDetl(String drawNo);
+
+    /**
+     * 审核出库单
+     * @param drawNo
+     * @param userId
+     * @return
+     * @throws MzException
+     */
+    int auditYpOutDetlYf(String drawNo, String userId) throws MzException;
+}

+ 154 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/yf/YpOutDetlYfServiceImpl.java

@@ -0,0 +1,154 @@
+package cn.hnthyy.thmz.service.impl.his.yf;
+
+import cn.hnthyy.thmz.entity.MzException;
+import cn.hnthyy.thmz.entity.his.yp.YpBaseYf;
+import cn.hnthyy.thmz.entity.his.yp.YpOutDetlYf;
+import cn.hnthyy.thmz.entity.his.yp.YpZdDict;
+import cn.hnthyy.thmz.mapper.his.mz.EmployeeMapper;
+import cn.hnthyy.thmz.mapper.his.yp.YpBaseYfMapper;
+import cn.hnthyy.thmz.mapper.his.yp.YpOutDetlYfMapper;
+import cn.hnthyy.thmz.mapper.his.yp.YpZdDictMapper;
+import cn.hnthyy.thmz.mapper.his.yp.YpZdManufactoryMapper;
+import cn.hnthyy.thmz.mapper.his.zd.ZdUnitCodeMapper;
+import cn.hnthyy.thmz.service.his.yf.YpOutDetlYfService;
+import cn.hnthyy.thmz.service.his.yp.YpConfigService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @description:药房药品出库服务
+ * @author: WANGJIALIANG
+ * @time: 2022/12/27 09:47
+ */
+@Service
+@Slf4j
+public class YpOutDetlYfServiceImpl implements YpOutDetlYfService {
+
+    @Autowired
+    private YpConfigService ypConfigService;
+    @SuppressWarnings("all")
+    @Autowired
+    private YpZdDictMapper ypZdDictMapper;
+    @SuppressWarnings("all")
+    @Autowired
+    private YpBaseYfMapper ypBaseYfMapper;
+    @SuppressWarnings("all")
+    @Autowired
+    private YpOutDetlYfMapper ypOutDetlYfMapper;
+    @SuppressWarnings("all")
+    @Autowired
+    private EmployeeMapper employeeMapper;
+    @SuppressWarnings("all")
+    @Autowired
+    private ZdUnitCodeMapper zdUnitCodeMapper;
+    @SuppressWarnings("all")
+    @Autowired
+    private YpZdManufactoryMapper ypZdManufactoryMapper;
+
+    @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
+    @Override
+    public int saveYpOutDetlYfList(Map<String, Object> map, String userId) throws MzException {
+        Date now = new Date();
+        List<Map<String, Object>> list = (List) map.get("list");
+        String drawNo;
+        if(StringUtils.isNotBlank(list.get(0).get("drawNo").toString())){
+            drawNo = list.get(0).get("drawNo").toString();
+            ypOutDetlYfMapper.deleteYpOutDetlYfByDrawNo(drawNo);
+        }else{
+            Integer yfOutNo = ypConfigService.getNo("yf_out_no");
+            SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
+            String str = "";
+            if (yfOutNo < 100) {
+                str = "00";
+            } else if (yfOutNo < 1000) {
+                str = "0";
+            }
+            drawNo = sdf.format(new Date()) + str + yfOutNo;
+        }
+        for (int i = 0; i < list.size(); i++) {
+            Map<String, Object> stringObjectMap = list.get(i);
+            YpZdDict ypZdDict = ypZdDictMapper.selectYpZdDictByCodeAndSerial(stringObjectMap.get("chargeCode").toString(), stringObjectMap.get("serial").toString());
+            YpBaseYf ypBaseYf = ypBaseYfMapper.selectYpBaseYf(stringObjectMap.get("chargeCode").toString(), stringObjectMap.get("serial").toString(), map.get("groupNo").toString(), null);
+            YpOutDetlYf ypOutDetlYf = new YpOutDetlYf();
+            ypOutDetlYf.setOutDate(now);
+            ypOutDetlYf.setOutSeri(1 + i);
+            ypOutDetlYf.setInSeri(1);
+            ypOutDetlYf.setDrawNo(drawNo);
+            ypOutDetlYf.setDeptCode(map.get("deptCode").toString());
+            ypOutDetlYf.setChargeCode(ypZdDict.getCode());
+            ypOutDetlYf.setSerial(ypZdDict.getSerial());
+            ypOutDetlYf.setPackRetprice(ypZdDict.getPackRetprice());
+            ypOutDetlYf.setOutAmt(Double.parseDouble(stringObjectMap.get("outAmt").toString()));
+            ypOutDetlYf.setDrawer(map.get("drawer").toString());
+            ypOutDetlYf.setOutType(map.get("outType").toString());
+            ypOutDetlYf.setStockAmount(ypBaseYf.getStockAmount()-ypOutDetlYf.getOutAmt());
+            ypOutDetlYf.setGroupNo(map.get("groupNo").toString());
+            ypOutDetlYf.setBuyPrice(ypZdDict.getBuyPrice());
+            ypOutDetlYf.setInputId(userId);
+            ypOutDetlYf.setKeeper(userId);
+            ypOutDetlYf.setConfirmFlag("0");
+            ypOutDetlYfMapper.insertYpOutDetlYf(ypOutDetlYf);
+        }
+        return 0;
+    }
+
+    @Override
+    public List<YpOutDetlYf> getYpOutDetlYfRecord(String drawNo,Date beginDate, Date endDate, String groupNo, String confirmFlag) {
+        List<YpOutDetlYf> ypOutDetlYfs = ypOutDetlYfMapper.selectYpOutDetlYfRecord(drawNo, beginDate, endDate, groupNo, confirmFlag);
+        for (int i = 0; i < ypOutDetlYfs.size(); i++) {
+            YpOutDetlYf ypOutDetlYf = ypOutDetlYfs.get(i);
+            ypOutDetlYf.setKeeperName(employeeMapper.selectByUserCode(ypOutDetlYf.getKeeper()).getEmployeeName());
+            ypOutDetlYf.setDrawerName(employeeMapper.selectByUserCode(ypOutDetlYf.getDrawer()).getEmployeeName());
+            if(StringUtils.isNotBlank(ypOutDetlYf.getConfirmId())){
+                ypOutDetlYf.setConfirmName(employeeMapper.selectByUserCode(ypOutDetlYf.getConfirmId()).getEmployeeName());
+            }
+            ypOutDetlYf.setDeptName(zdUnitCodeMapper.selectByCode(ypOutDetlYf.getDeptCode()).getName());
+        }
+        return ypOutDetlYfs;
+    }
+
+    @Override
+    public List<YpOutDetlYf> getYpOutDetlYfDetl(String drawNo) {
+        List<YpOutDetlYf> ypOutDetlYfs = ypOutDetlYfMapper.selectYpOutDetlYfDetl(drawNo);
+        for (int i = 0; i < ypOutDetlYfs.size(); i++) {
+            YpOutDetlYf ypOutDetlYf = ypOutDetlYfs.get(i);
+            YpZdDict ypZdDict = ypZdDictMapper.selectYpZdDictByCodeAndSerial(ypOutDetlYf.getChargeCode(), ypOutDetlYf.getSerial());
+            ypOutDetlYf.setName(ypZdDict.getName());
+            ypOutDetlYf.setSpecification(ypZdDict.getSpecification());
+            ypOutDetlYf.setManufactoryName(ypZdManufactoryMapper.selectYpZdManufactoryByCode(ypZdDict.getManuCode()));
+        }
+        return ypOutDetlYfs;
+    }
+
+    @Override
+    @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
+    public int auditYpOutDetlYf(String drawNo, String userId) throws MzException {
+        List<YpOutDetlYf> ypOutDetlYfs = ypOutDetlYfMapper.selectYpOutDetlYfDetl(drawNo);
+        for (int i = 0; i < ypOutDetlYfs.size(); i++) {
+            YpOutDetlYf ypOutDetlYf = ypOutDetlYfs.get(i);
+            if(1 == ypBaseYfMapper.updateStockAmount(ypOutDetlYf.getChargeCode(),ypOutDetlYf.getSerial(),
+                    ypOutDetlYf.getGroupNo(),-ypOutDetlYf.getOutAmt(), BigDecimal.valueOf(-ypOutDetlYf.getOutAmt()).multiply(ypOutDetlYf.getPackRetprice()))){
+                log.info("药房出库药品成功[单号:{},编码:{},规格:{},数量:{}]", drawNo,ypOutDetlYf.getChargeCode(),ypOutDetlYf.getSerial(),-ypOutDetlYf.getOutAmt());
+            }else{
+                new MzException("药房出库药品审核失败,单号:"+drawNo);
+            }
+            YpOutDetlYf yp = new YpOutDetlYf();
+            yp.setConfirmId(userId);
+            yp.setConfirmFlag("1");
+            yp.setDrawNo(drawNo);
+            ypOutDetlYfMapper.updateYpOutDetlYf(yp);
+        }
+        return 0;
+    }
+}

+ 443 - 0
src/main/resources/static/js/yf/drug_delivery_dept.js

@@ -0,0 +1,443 @@
+//@ sourceURL=drug_delivery_dept.js
+var groupNo = window.localStorage["groupNo"];//药房编码
+$(function () {
+    init_daterangepicker();
+    $('.datetime').datetimepicker({
+        language: 'zh-CN',
+        format: 'yyyy-mm-dd',
+        autoclose: true,
+        minView: 2,
+        startView: 2,
+    });
+    initDetailed();
+    initEmployeeSelect("drawer");
+    initDynamicSelect("allUnitCode",'deptCode');
+    initSearchList('<div id="medicinePopoverContent"><table id="tb_table_medicine"></table></div>',
+        'drugName', 600, 250);
+    $('#drugName').on('input focus', function (e) {
+        showDrugPopover({
+            url: '/thmz/getYpBaseYfLike',
+            data:{
+                groupNo: groupNo,
+                searchText: $("#drugName").val() == "" ? null : $("#drugName").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) {
+                let dataRow = {
+                    chargeCode: row['code'],
+                    name: row['name'],
+                    specification: row['specification'],
+                    packRetprice: row['packRetprice'],
+                    amount: 0,
+                    outAmt: 0,
+                    amountOutMoney: 0,
+                    serial: row['serial'],
+                    stockAmount: row['stockAmount'],
+                    manufactoryName: row['manufactoryName']
+                };
+                addRowToLast("tb_table_detailed", dataRow);
+                $('#drugName').webuiPopover('hide');
+                $('#drugName').val('');
+            }
+        });
+    });
+    $('#buyAmt').on('input focus', function (e) {
+        $("#buyValue").val((e.target.value * $("#buyPrice").val()).toFixed(2));
+    });
+    $('#buyPrice').on('input focus', function (e) {
+        $("#buyValue").val((e.target.value * $("#buyAmt").val()).toFixed(2));
+    });
+    $('#reportrange span').html(moment().subtract(29, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
+    $(".selectpicker").selectpicker();
+    if (groupNo == null) {
+        return errorMesageSimaple('药库参数未设置,请在药品管理参数设置中设置');
+    }
+    $("input").each(function () {
+        this.onkeydown = function (e) { // 监听键盘事件
+            let theEvent = window.event || e;
+            let code = theEvent.keyCode || theEvent.which;
+            if (code === 13) {//回车事件
+                $("#btn_query").click(); //触发搜索按钮点击事件
+            }
+        }
+    });
+    $("#btn_query").click(function (t) {
+        initRecordTable();
+    });
+    $("#btn_record").click(function () {
+        $("#recordModal").modal("show");
+        $('#reportrange span').html(moment().subtract(7, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
+        $("#recordForm")[0].reset();
+        $("#statusFlagSearch").selectpicker('refresh');
+        initRecordTable();
+    });
+    $("#btn_save").on('click', function () {
+        if ($("#statusLabel").html() === '已审核') {
+            return warningMesageSimaple('已审核,请勿重复保存!');
+        }
+        if(isEmpty($("#deptCode").val())){
+            return errorMesageSimaple('领药科室为空!');
+        }
+        if(isEmpty($("#drawer").val())){
+            return errorMesageSimaple('请领人为空!');
+        }
+        let outDetlList = [];
+        var data = $("#tb_table_detailed").jqGrid("getRowData");
+        for (let i = 0; i < data.length; i++) {
+            if (parseFloat(data[i].outAmt === '' ? 0 : data[i].outAmt) > 0) {
+                outDetlList.push(data[i])
+            }
+        }
+        request({
+            url: '/saveYpOutDetlYfList',
+            method: 'POST',
+            data: JSON.stringify({
+                list: outDetlList,
+                outType: $("#outType1Search").val(),
+                deptCode: $("#deptCode").val()[0],
+                drawer: $("#drawer").val()[0],
+                groupNo:groupNo
+            })
+        }).then((res) => {
+            $("#btn_clean").click();
+            successMesage(res);
+        });
+    });
+    $("#btn_audit").on('click', function () {
+        if ($("#statusLabel").html() !== '未审核') {
+            return warningMesageSimaple('没有可审核的数据!');
+        }
+        if (!confirm("确定审核出库吗?(注意:审核后本张出库单将不能再修改)")) {
+            return;
+        }
+        request({
+            url: '/auditYpOutDetlYf',
+            method: 'GET',
+            data: {
+                drawNo: $("#drawNoLabel").html()
+            }
+        }).then((res) => {
+            $("#btn_clean").click();
+            successMesage(res);
+        });
+    });
+    $("#btn_daily").click(function (t) {
+        setPrintHtml();
+    });
+    $("#btn_clean").on('click', function () {
+        $("#deptCode").selectpicker('val', '');
+        $("#deptCode").removeAttr('disabled');
+        $("#deptCode").selectpicker('refresh');
+        $("#drawer").selectpicker('val', '');
+        $("#drawer").removeAttr('disabled');
+        $("#drawer").selectpicker('refresh');
+        $("#drawNoLabel").text('');
+        $("#drawerNameLabel").text('');
+        $("#keeperNameLabel").text('');
+        $("#confirmNameLabel").text('');
+        $("#statusLabel").text('未确认');
+        $("#xxform")[0].reset();
+        $("#tb_table_detailed").jqGrid('clearGridData');
+        $("#outType1Search").val(0);
+        $("#outType1Search").selectpicker('refresh');
+    });
+});
+
+/**
+ * 查询列表
+ */
+function initRecordTable() {
+    $('#tb_record').bootstrapTable('destroy');
+    $('#tb_record').bootstrapTable({
+        url: '/thmz/queryYpOutDetlYfRecord',         //请求后台的URL(*)
+        method: 'GET',                      //请求方式(*)
+        toolbar: '#toolbar',                //工具按钮用哪个容器
+        striped: true,                      //是否显示行间隔色
+        cache: false,                       //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
+        pagination: true,                   //是否显示分页(*)
+        sortable: true,                     //是否启用排序
+        sortOrder: "asc",                   //排序方式
+        queryParams: recordTableQueryParams,           //传递参数(*)
+        sidePagination: "client",          //分页方式:client客户端分页,server服务端分页(*)
+        pageNumber: 1,                       //初始化加载第一页,默认第一页
+        pageSize: 10,                       //每页的记录行数(*)
+        pageList: [10, 20, 40, 100],        //可供选择的每页的行数(*)
+        search: false,                       //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
+        strictSearch: true,
+        showColumns: false,                  //是否显示所有的列
+        showRefresh: false,                  //是否显示刷新按钮
+        minimumCountColumns: 2,             //最少允许的列数
+        clickToSelect: true,                //是否启用点击选中行
+        uniqueId: "ID",                     //每一行的唯一标识,一般为主键列
+        showToggle: false,                    //是否显示详细视图和列表视图的切换按钮
+        cardView: false,                    //是否显示详细视图
+        detailView: false,
+        ajaxOptions: {
+            headers: {
+                'Accept': 'application/json',
+                'Authorization': 'Bearer ' + localStorage.getItem("token")
+            }
+        },
+        columns: [
+            {
+                field: 'outDate',
+                title: '确认日期',
+                align: "center",
+                valign: 'middle',
+                formatter: function (value, row, index) {
+                    return format(value, "yyyy-MM-dd HH:mm:ss");
+                }
+            }, {
+                field: 'drawNo',
+                title: '单号' ,
+                align: "center",
+                valign: 'middle'
+            }, {
+                field: 'deptName',
+                title: '领药科室',
+                align: "center",
+                valign: 'middle'
+            },
+            {
+                field: 'drawerName',
+                title: '申请人',
+                align: "center",
+                valign: 'middle'
+            },
+            {
+                field: 'keeperName',
+                title: '经发人',
+                align: "center",
+                valign: 'middle'
+            }, {
+                field: 'confirmDate',
+                title: '审核出库日期',
+                align: "center",
+                valign: 'middle',
+                formatter: function (value, row, index) {
+                    return format(value, "yyyy-MM-dd HH:mm:ss");
+                }
+            },
+            {
+                field: 'confirmName',
+                title: '审核人',
+                align: "center",
+                valign: 'middle'
+            }
+        ],
+        onDblClickRow: function (row) {
+            getDetail(row.drawNo);
+            $("#xxform")[0].reset();
+            let status = $("#statusFlagSearch option:checked").text();
+            $("#statusLabel").html(status);
+            $("#outType1Search").val(row['outType']);
+            $("#outType1Search").selectpicker('refresh');
+            $("#drawNoLabel").text(row['drawNo']);
+            $("#deptCode").selectpicker('val', row['deptCode']);
+            $("#deptCode").selectpicker('refresh');
+            $("#drawer").selectpicker('val', row['drawer']);
+            $("#drawer").selectpicker('refresh');
+            $("#drawerNameLabel").text(row['drawerName']);
+            $("#confirmNameLabel").text(row['confirmName']);
+            $("#keeperNameLabel").text(row['keeperName']);
+        },
+        responseHandler: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view';
+                return;
+            }
+            var ress = eval(res);
+            if (ress.code == -1) {
+                errorMesage(res);
+                return {
+                    "total": 0,//总页数
+                    "rows": {}   //数据
+                };
+            }
+            return {
+                "total": ress.total,//总页数
+                "rows": ress.data   //数据
+            };
+        }
+    });
+}
+
+function getDetail(drawNo) {
+    $("#recordModal").modal("hide");
+    loadDetailed(drawNo);
+}
+
+function recordTableQueryParams(params) {
+    let rePortRangeArr = getRePortRangeArr();
+    let temp = {
+        drawNo: $("#drawNoSearch").val(),
+        beginDate: rePortRangeArr[0],
+        endDate: rePortRangeArr[1],
+        groupNo: groupNo,
+        confirmFlag: $("#statusFlagSearch").val()
+    };
+    return temp;
+}
+
+/**
+ * 加载详细表格数据
+ * @param inDocuNo
+ */
+function loadDetailed(drawNo) {
+    $("#tb_table_detailed").jqGrid('setGridParam', {
+        datatype: 'JSON',
+        url: '/thmz/getYpOutDetlDrugYf',
+        postData: {drawNo: drawNo}
+    }).trigger('reloadGrid');
+}
+
+/**
+ * 初始化详细表格
+ */
+function initDetailed() {
+    let selectRowId;//选中的行号
+    $.jgrid.gridUnload("tb_table_detailed");
+    $("#tb_table_detailed").jqGrid({
+        datatype: 'local',
+        mtype: 'GET',
+        url: url,
+        loadBeforeSend: function (jqXHR) {
+            jqXHR.setRequestHeader("Authorization", 'Bearer ' + localStorage.getItem("token"));
+            jqXHR.setRequestHeader("Accept", 'application/json');
+        },
+        ajaxCellOptions: {
+            beforeSend: function (XMLHttpRequest) {
+                XMLHttpRequest.setRequestHeader("Authorization", 'Bearer ' + localStorage.getItem("token"));
+            }
+        },
+        height: screen.height * 0.3,
+        toolbar: [true, "top"],
+        styleUI: 'Bootstrap',
+        autowidth: true,
+        autoScroll: true,
+        shrinkToFit: true,
+        rowNum: -1,//取消分页
+        caption: '出入库单明细',
+        cellEdit: true,
+        sortable: false,
+        loadonce: false, //一次加载全部数据到客户端,由客户端进行排序。
+        cellsubmit: "clientArray",
+        colNames: ['单号', '药品编码', '药品名称', '规格', '生产厂家', '零售价', '当前库存', '出库量', 'serial', '出库日期'],
+        colModel: [
+            {name: 'drawNo', index: 'drawNo', align: 'center'},
+            {name: 'chargeCode', index: 'chargeCode', align: 'center'},
+            {name: 'name', index: 'name', align: 'left'},
+            {name: 'specification', index: 'specification', align: 'left'},
+            {name: 'manufactoryName', index: 'manufactoryName',align:'left'},
+            {name: 'packRetprice', index: 'packRetprice', align: 'center'},
+            {name: 'stockAmount', index: 'stockAmount', align: 'center'},
+            {
+                name: 'outAmt', index: 'outAmt', align: 'center', width: 100, editable: true, edittype: 'text'
+                , editrules: {edithidden: true, number: true, minValue: 0},
+                formatter: function (cellvalue, options, rowObject) {
+                    return isEmpty(cellvalue) ? 0 : cellvalue;
+                }
+            },
+            {name: 'serial', index: 'serial', hidden: true},
+            {name: 'confirmDate', index: 'confirmDate', hidden: true}
+        ],
+        jsonReader: {
+            root: "data", repeatitems: false
+        },
+        loadComplete: function (res) { //加载完成(初始加载),回调函数
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view';
+                return;
+            }
+            if (res.code == -1) {
+                errorMesage(res);
+            }
+        }
+    });
+    $("#t_tb_table_detailed").append("<input id='drugName' name='drugName' type='text' style='margin-left: 10px;' placeholder='添加药品...'>");
+    //$("#t_tb_table_detailed").append("<button class='registration-no-color-foot-button' title='删除药品' id='remove'  style='color: red;margin-left: 10px;'><i class='fa fa-trash-o'></i></button>");
+    $("#remove").on('click', function () {
+        if (selectRowId == null) {
+            return errorMesageSimaple('请选择一行进行删除!');
+        }
+        $("#tb_table_detailed").jqGrid("delRowData", selectRowId);
+    });
+}
+
+/**
+ * 生产报表数据
+ */
+function setPrintHtml() {
+    var datas = $("#tb_table_detailed").jqGrid("getRowData");
+    let html = '';
+    let packRetpriceSum = 0;
+    $('.sjh').remove();
+    for (let i = 0; i < datas.length; i++) {
+        let data = datas[i];
+        let packRetprice = keepTwoDecimal(parseFloat(data['outAmt']) * parseFloat(data['packRetprice']));
+        packRetpriceSum += packRetprice;
+        if (i === 0) {
+            $(".printDate").html(format(new Date(), "yyyy-MM-dd HH:mm"));
+            $(".title").html(getGroupName(groupNo)+"药品出库单");
+            let w_code = $("#deptCode").find("option:selected").text();
+            $(".deptName").html(w_code.substring(0, w_code.lastIndexOf("(")));
+            $(".drawNo").html(data['drawNo']);
+            $(".confirmDate").html(format(data['confirmDate'], "yyyy-MM-dd"));
+            $(".listerAudit").html($("#confirmNameLabel").html());
+            $(".drawer").html($("#drawerNameLabel").html());
+            $(".keeper").html($("#keeperNameLabel").html());
+        }
+        html += '<tr class="sjh">';
+        html += '<td class="xtd" style="text-align: center;">' + data['chargeCode'] + '</td>';
+        html += '<td class="xtd" style="text-align: left;">' + data['name'] + '</td>';
+        html += '<td class="xtd" style="text-align: left;">' + data['specification'] + '</td>';
+        html += '<td class="xtd" style="text-align: center;">' + data['outAmt'] + '</td>';
+        html += '<td class="xtd" style="text-align: center;">' + data['packRetprice'] + '</td>';
+        html += '<td class="xtd" style="text-align: center;">' + packRetprice + '</td>';
+        html += '<td class="xtd" style="text-align: left;">' + data['manufactoryName'] + '</td>';
+        html += '</tr>';
+    }
+    $("#base_tr").after(html);
+    $(".packRetpriceSum").html(keepTwoDecimal(packRetpriceSum));
+    print();
+}
+
+/**
+ * 打印报表
+ */
+function print() {
+    setDefaultPrint();
+    LODOP = getLodop();
+    LODOP.PRINT_INITA(6, 0, "221mm", "93mm", "长沙泰和医院药品出库单");
+    LODOP.SET_PRINT_PAGESIZE(1, "221mm", "93mm", "");
+    //设置默认打印机
+    LODOP.SET_PRINTER_INDEX(defaultPrintIndex);
+    LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
+    var strStyle = "<style>table,td,th {border-width: 1px;" +
+        "border-style: solid;border-collapse: collapse;table-layout:fixed;word-wrap:break-word;font-size: 13px}</style>";
+    LODOP.ADD_PRINT_HTM("2mm", "4mm", "RightMargin:2mm", "BottomMargin:15mm", strStyle + document.getElementById("report_table_1").innerHTML);
+    LODOP.PRINT();
+    //LODOP.PREVIEW();
+}
+
+//最后一行新增数据
+function addRowToLast(gridID, dataRow) {
+    var ids = jQuery("#" + gridID).jqGrid('getDataIDs');
+    if (ids.length == 0) {
+        ids = [0];
+    }
+    //获得当前最大行号(数据编号)
+    var rowid = Math.max.apply(Math, ids);
+    //获得新添加行的行号(数据编号)
+    var newrowid = rowid + 1;
+    $("#" + gridID).jqGrid("addRowData", newrowid, dataRow, "last");
+    return newrowid;
+}

+ 219 - 0
src/main/resources/templates/yf/drug_delivery_dept.html

@@ -0,0 +1,219 @@
+<link rel="stylesheet" href="/thmz/css/bootstrap/css/bootstrap-select.css"/>
+<link rel="stylesheet" href="/thmz/css/bootstrap/css/daterangepicker.css"/>
+<link rel="stylesheet" href="/thmz/css/jquery.webui-popover.min.css">
+<link rel="stylesheet" href="/thmz/css/custom.min.css">
+<link rel="stylesheet" href="/thmz/css/jqGrid/ui.jqgrid-bootstrap.css">
+<link rel="stylesheet" href="/thmz/css/toll_administration.css">
+<script src="/thmz/js/dependent/bootstrap-select.js"></script>
+<script src="/thmz/js/dependent/daterangepicker.js"></script>
+<script src="/thmz/js/jqGrid/grid.locale-cn.js"></script>
+<script src="/thmz/js/jqGrid/jquery.jqGrid.min.js"></script>
+<script src="/thmz/js/dependent/jquery.webui-popover.min.js"></script>
+<script src="/thmz/js/common/pharmacy-com.js"></script>
+<script src="/thmz/js/yf/drug_delivery_dept.js"></script>
+<script src="/thmz/js/dependent/LodopFuncs.js"></script>
+<title>科室药品入出库</title>
+<style type="text/css">
+    .alignLeft {
+        text-align: left !important;
+    }
+</style>
+<div class="row" style="height: calc(100% - 60px);overflow-y: auto;">
+    <div class="col-md-12 col-sm-12 col-xs-12">
+        <div class="x_panel" style="background: #EBEBE4;">
+            <form id="xxform" class="form-horizontal" autocomplete="off">
+                <div class="form-group">
+                    <div class="col-md-3 col-sm-3 col-xs-12">
+                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="deptCode">领药科室
+                            <span class="required">*</span>
+                        </label>
+                        <div class="col-md-8 col-sm-8 col-xs-12">
+                            <select class="form-control selectpicker show-tick" data-live-search="true" title="请选择"
+                                    multiple
+                                    data-max-options="1"
+                                    id="deptCode">
+                            </select>
+                        </div>
+                    </div>
+                    <div class="col-md-2 col-sm-2 col-xs-12 item">
+                        <label class="control-label col-md-4 col-sm-4 col-xs-12" for="drawer">请领人
+                            <span class="required">*</span>
+                        </label>
+                        <div class="col-md-8 col-sm-8 col-xs-12">
+                            <select class="form-control selectpicker show-tick" title="请选择" data-live-search="true"  multiple data-max-options="1"
+                                    id="drawer" name="drawer" required="required">
+                            </select>
+                        </div>
+                    </div>
+                    <label class="control-label col-md-1 col-sm-1 col-xs-12" for="outType1Search">出库类型:
+                    </label>
+                    <div class="col-md-1 col-sm-1 col-xs-12">
+                        <select class="form-control selectpicker show-tick" required="required" title="请选择"
+                                id="outType1Search">
+                            <option value="0" selected>出库</option>
+                            <option value="1">报损</option>
+                        </select>
+                    </div>
+                    <div class="col-md-3 col-sm-3 col-xs-12">
+                        <button type="button" style="margin-left:3px" id="btn_save" class="btn btn-primary"
+                                title="保存"><i class="fa fa-save"></i>
+                        </button>
+                        <button type="button" style="margin-left:3px" id="btn_audit" class="btn btn-primary"
+                                title="审核"><i class="fa fa-check-square-o"></i>
+                        </button>
+                        <button type="button" style="margin-left:3px" id="btn_record" class="btn btn-primary"
+                                title="入库单记录"><i class="fa fa-list-alt"></i>
+                        </button>
+                        <button type="button" id="btn_daily" class="btn btn-primary"
+                                title="打印"><i class="fa fa-print"></i>
+                        </button>
+                        <button type="button" id="btn_clean" class="btn btn-primary"
+                                title="重置"><i class="fa fa-rotate-left"></i>
+                        </button>
+                    </div>
+                </div>
+                <br>
+                <div class="form-group">
+                    <label class="control-label col-md-2 col-sm-2 col-xs-12 alignLeft" for="drawNoLabel">单号:
+                        <span id="drawNoLabel" style='color: green'></span>
+                    </label>
+                    <label class="control-label col-md-1 col-sm-1 col-xs-12 alignLeft" for="drawerNameLabel">请领人:
+                        <span id="drawerNameLabel"></span>
+                    </label>
+                    <label class="control-label col-md-1 col-sm-1 col-xs-12 alignLeft" for="keeperNameLabel">经发人:
+                        <span id="keeperNameLabel"></span>
+                    </label>
+                    <label class="control-label col-md-1 col-sm-1 col-xs-12 alignLeft" for="confirmNameLabel">审核人:
+                        <span id="confirmNameLabel"></span>
+                    </label>
+                    <label class="control-label col-md-1 col-sm-1 col-xs-12" for="statusLabel">出库状态:
+                        <span id="statusLabel" style="color: red">未确认</span>
+                    </label>
+                </div>
+            </form>
+            <div id="report_table"
+                 style="width:1030px;height: calc(100% - 160px);margin:0 auto;border: 1px solid #337ab7;font-size: 14px;padding: 40px 10px 40px 10px;overflow: scroll;display: none">
+                <div id="report_table_1">
+                    <table id="qbtj_table" class="table table-striped"
+                           style="margin-top: 0px;border: transparent !important;">
+                        <tr style="font-weight: 700;background-color: #EBEBE4;height: 70px;">
+                            <td colspan="7" style="font-size: 21px;text-align: center;border: transparent !important;">
+                                <span>长沙泰和医院</span><br>
+                                <span class="title"></span>
+                            </td>
+                        </tr>
+                        <tr style="font-weight: 700;background-color: #EBEBE4">
+                            <td colspan="2" style="text-align: left;border: transparent !important;">领药科室:<span
+                                    class="deptName"></span></td>
+                            <td colspan="2" style="text-align: left;border: transparent !important;">单号:<span
+                                    class="drawNo"></span></td>
+                            <td colspan="2" style="text-align: left;border: transparent !important;">出库日期:<span
+                                    class="confirmDate"></span></td>
+                            <td colspan="1" style="text-align: left;border: transparent !important;">打印日期:<span
+                                    class="printDate"></span></td>
+                        </tr>
+                        <tr id="base_tr">
+                            <td class="xtd" style="text-align: center;width: 60px;">编码</td>
+                            <td class="xtd" style="text-align: center;width: 180px;">药品名称</td>
+                            <td class="xtd" style="text-align: center;width: 100px;">规格</td>
+                            <td class="xtd" style="text-align: center;width: 100px;">数量</td>
+                            <td class="xtd" style="text-align: center;width: 100px;">零售价</td>
+                            <td class="xtd" style="text-align: center;width: 100px;">零售金额</td>
+                            <td class="xtd" style="text-align: center;width: 180px;">生产厂家</td>
+                        </tr>
+                        <tr style="border: transparent !important;"></tr>
+                        <tr>
+                            <td colspan="1" class="xtd"
+                                style="text-align: right;border: transparent !important;font-weight: bold;">合计:
+                            </td>
+                            <td colspan="5" class="xtd"
+                                style="text-align: right;border: transparent !important;font-weight: bold;">零售总额:<span
+                                    class="packRetpriceSum"></span></td>
+                        </tr>
+                        <tr style="border: transparent !important;"><td class="xtd" style="text-align: left;border: transparent !important;">&nbsp;</td></tr>
+                        <tr>
+                            <td colspan="2" class="xtd" style="text-align: left;border: transparent !important;">请领人:
+                                <span class="drawer"></span>
+                            </td>
+                            <td colspan="1" class="xtd" style="text-align: left;border: transparent !important;">出库人:
+                                <span class="keeper"></span>
+                            </td>
+                            <td colspan="1" class="xtd" style="text-align: left;border: transparent !important;">复核人:
+                                <span class="listerAudit"></span>
+                            </td>
+                            <td colspan="2" class="xtd" style="text-align: left;border: transparent !important;">
+                                主任审批:
+                            </td>
+                            <td colspan="2" class="xtd" style="text-align: left;border: transparent !important;">审批日期:
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+            <table id="tb_table_detailed"></table>
+        </div>
+    </div>
+</div>
+
+<!--调未审核单弹窗开始-->
+<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-hidden="true" id="recordModal">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content" style="width: 130%;margin-top: 50px;margin-left: -100px;">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
+                </button>
+                <h4 class="modal-title">出入库记录单</h4>
+            </div>
+            <div class="modal-body">
+                <div class="row">
+                    <div class="col-md-12 col-sm-12 col-xs-12">
+                        <form id="recordForm" class="form-horizontal" autocomplete="off">
+                            <div class="form-group">
+                                <label class="control-label col-md-1 col-sm-1 col-xs-12" for="drawNoSearch">单号:
+                                </label>
+                                <div class="col-md-2 col-sm-2 col-xs-12">
+                                    <input id="drawNoSearch" class="form-control optional" type="text">
+                                </div>
+                                <label class="control-label col-md-1 col-sm-1 col-xs-12" for="statusFlagSearch">状态:
+                                </label>
+                                <div class="col-md-2 col-sm-2 col-xs-12">
+                                    <select class="form-control selectpicker show-tick" required="required" title="请选择"
+                                            id="statusFlagSearch" onchange="initRecordTable()">
+                                        <option value="0" selected>未审核</option>
+                                        <option value="1">已审核</option>
+                                    </select>
+                                </div>
+                                <label class="control-label col-md-1 col-sm-1 col-xs-12" for="reportrange">
+                                    时间范围
+                                </label>
+                                <div class="col-md-3 col-sm-3 col-xs-12" style="width: 220px;">
+                                    <div id="reportrange" class="pull-left"
+                                         style="background: #fff; cursor: pointer; padding: 6.5px 10px; border: 1px solid #ccc">
+                                        <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
+                                        <span>December 30, 2014 - January 28, 2015</span> <b class="caret"></b>
+                                    </div>
+                                </div>
+                                <div class="col-md-1 col-sm-1 col-xs-12 item">
+                                    <button type="button" style="margin-left:3px" id="btn_query" class="btn btn-primary"
+                                            title="查询"><i class="fa fa-search"></i>
+                                    </button>
+                                </div>
+                            </div>
+                        </form>
+                    </div>
+                    <div class="col-md-12 col-sm-12 col-xs-12">
+                        <table id="tb_record"></table>
+                    </div>
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+            </div>
+        </div>
+    </div>
+</div>
+<!--调未审核单弹窗结尾-->
+<!--加载中提示结尾-->
+<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
+    <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
+</object>