123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- <!DOCTYPE html>
- <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
- <head>
- <th:block th:include="include :: header('先销售后登记列表')" />
- <th:block th:include="include :: layout-latest-css" />
- <th:block th:include="include :: ztree-css" />
- </head>
- <body class="gray-bg">
- <div class="ui-layout-center">
- <div class="container-div">
- <div class="row">
- <div class="col-sm-12 search-collapse">
- <div class="query-condition-container">
- <h4 class="query-condition-title">查询条件</h4>
- <div class="query-buttons">
- <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
- </div>
- </div>
- <form id="user-form" class="customize-search-form">
- <div class="customize-form-group-container">
- <div class="customize-form-group">
- <label>患者信息:</label>
- <input type="text" class="styled-input" placeholder="请输入患者姓名或手机号" name="query"/>
- </div>
- <div class="customize-form-group">
- <label>销售单号:</label>
- <input type="text" class="styled-input" placeholder="请输入销售单号号" name="salesOrderNumber"/>
- </div>
- <div class="customize-form-group">
- <label>药品编码:</label>
- <input type="text" class="styled-input" placeholder="请输入药品编码" name="mdmCode"/>
- </div>
- <div class="customize-form-group">
- <label>药品名:</label>
- <input type="text" class="styled-input" placeholder="请输入药品名" name="productName"/>
- </div>
- <!-- <div class="customize-form-group">-->
- <!-- <label>处方单号:</label>-->
- <!-- <input type="text" class="styled-input" name="prescriptionNumber"/>-->
- <!-- </div>-->
- <!-- <div class="customize-form-group">-->
- <!-- <label>处方类型</label>-->
- <!-- <select name="prescriptionType" th:with="type=${@dict.getType('sys_select_prescription_ype')}" class="styled-input">-->
- <!-- <option value="">全部</option>-->
- <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"-->
- <!-- ></option>-->
- <!-- </select>-->
- <!-- </div>-->
- <div class="customize-form-group select-time">
- <label>销售日期:</label>
- <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="sbeginTime"/>
- <span>-</span>
- <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="sendTime"/>
- </div>
- <div class="customize-form-group">
- <label>订单状态</label>
- <select name="status" th:with="type=${@dict.getType('sys_select_order_status')}" class="styled-input">
- <option value="">全部</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
- ></option>
- </select>
- </div>
- </div>
- </form>
- <form id="user-form2" class="customize-search-form">
- <h4>模拟生成销售单</h4>
- <div class="customize-form-group">
- <label>随机生成几个销售订单:</label>
- <input type="number" class="styled-input" placeholder="请输入数字" name="limitNumber" />
- <a class="btn btn-primary btn-rounded btn-sm" onclick="createOrder()" shiro:hasPermission="ddgl:dd:add"><i class="fa fa-search"></i>生成订单</a>
- <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre2()"><i class="fa fa-refresh"></i> 重置</a>
- </div>
- </form>
- <!-- <form id="user-form3" class="customize-search-form">-->
- <!-- <h4>按条件查询生成指定的订单</h4>-->
- <!-- <div class="customize-form-group-container">-->
- <!-- <div class="customize-form-group">-->
- <!-- <label>患者姓名:</label>-->
- <!-- <input type="text" class="styled-input" placeholder="请输入患者姓名" name="patientName"/>-->
- <!--<!– <label>药品编码:</label>–>-->
- <!--<!– <input type="text" class="styled-input" placeholder="请输入药品编码" name="mdmCode"/>–>-->
- <!-- <label>门店ID:</label>-->
- <!-- <input type="text" class="styled-input" placeholder="请输入门店ID" name="storeId"/>-->
- <!-- </div>-->
- <!-- <div class="customize-form-group select-time">-->
- <!-- <label>销售日期:</label>-->
- <!-- <input type="text" class="time-input" id="startTime2" placeholder="开始时间" name="startTime"/>-->
- <!-- <span>-</span>-->
- <!-- <input type="text" class="time-input" id="endTime2" placeholder="结束时间" name="endTime"/>-->
- <!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="createOrder2()" shiro:hasPermission="ddgl:dd:add"><i class="fa fa-search"></i>生成订单</a>-->
- <!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre3()"><i class="fa fa-refresh"></i> 重置</a>-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- </form>-->
- </div>
- <div class="btn-group-sm" id="toolbar" role="group">
- <!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="dtp:recipe:add">-->
- <!-- <i class="fa fa-plus"></i> 处方登记APP-->
- <!-- </a>-->
- <a class="btn btn-success" onclick="$.operate.addTab2()" shiro:hasPermission="dtp:recipe:add">
- <i class="fa fa-plus"></i> 新建登记
- </a>
- </div>
- <div class="col-sm-12 select-table table-striped" style="width: 100%; overflow-x: hidden;">
- <table id="bootstrap-table" class="fixed-layout-table"></table>
- </div>
- </div>
- </div>
- </div>
- <th:block th:include="include :: footer" />
- <th:block th:include="include :: layout-latest-js" />
- <th:block th:include="include :: bootstrap-table-fixed-columns-js" />
- <th:block th:include="include :: ztree-js" />
- <script th:inline="javascript">
- var editFlag = [[${@permission.hasPermi('dtp:recipe:edit')}]];
- var removeFlag = [[${@permission.hasPermi('dtp:recipe:add')}]];
- var queryFlag = [[${@permission.hasPermi('dtp:recipe:query')}]];
- var prefix = ctx + "dtp/recipe";
- var prefix_pmService = ctx + "dtp/pmService";
- $(function() {
- var panehHidden = false;
- if ($(this).width() < 1590) {
- panehHidden = true;
- }
- $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
- // 回到顶部绑定
- if ($.fn.toTop !== undefined) {
- var opt = {
- win:$('.ui-layout-center'),
- doc:$('.ui-layout-center')
- };
- $('#scroll-up').toTop(opt);
- }
- queryUserList();
- });
- $(document).ready(function() {
- });
- function queryUserList() {
- var options = {
- url: prefix + "/salesList",
- viewUrl: prefix + "/viewInfo/{id}",
- createUrl: prefix + "/add",
- createUrl2: prefix + "/newRecipe",
- updateUrl: prefix + "/viewEditInfo/{id}",
- removeUrl: prefix + "/remove",
- exportUrl: prefix + "/export",
- //importUrl: prefix + "/importData",
- importTemplateUrl: prefix + "/importTemplate",
- sortName: "id",
- sortOrder: "desc",
- modalName: "处方登记信息",
- fitColumns: true,
- striped: true,
- autoRowHeight: true,
- rowNumbers: true,
- showFooter:true, //是否显示表格底部区域。
- clickToSelect: true, //是否启用点击行时选中整行的功能。
- singleSelect: true, //是否仅允许选择一行
- fixedColumns: true,
- //fixedNumber: 3,
- fixedRightNumber: 1,
- columns: [{
- checkbox: true
- }, {field: "id",title: "ID",visible: false},
- { field: "mdmCode", title: "药品编码" },
- { field: "prescriptionNumber", title: "处方单号" },
- { field: "salesOrderNumber", title: "销售单号" },
- { field: "status", title: "状态", formatter: function(value, row, index) {
- switch (value) {
- case 1: return "订单已完成";
- case 2: return "待上传处方";
- case 3: return "待确认信息";
- case 4: return "待处方登记";
- case 5: return "待订单销售";
- case 6: return "待绑定患者";
- case 7: return "处方已完成";
- case 8: return "订单已退款";
- case 9: return "退款中";
- case 10: return "已取消";
- case 11: return "待支付";
- case 12: return "已支付";
- default: return "待确认信息";
- }
- }
- },
- { field: "saleDate", title: "销售日期" },
- { field: "prescriptionIssueDate", title: "处方开具日期" },
- { field: "registrationDate", title: "处方登记日期" },
- { field: "administrationMethod", title: "给药方式" },
- { field: "productName", title: "商品名称" },
- { field: "genericName", title: "通用名称" },
- { field: "specification", title: "规格" },
- { field: "drug_batch_number", title: "药品批号", visible: true },
- { field: "sales_storeCode", title: "销售门店编码", visible: true },
- { field: "sales_storeName", title: "销售门店名称", visible: true },
- { field: "patientName", title: "患者姓名" },
- { field: "gender", title: "性别", formatter: function(value, row, index) {
- switch (value) {
- case 0: return "男";
- case 1: return "女";
- default: return "未知";
- }
- }
- },
- { field: "age", title: "年龄" },
- { field: "patientPhone", title: "患者手机号" },
- { field: "storeName", title: "建档门店", visible: true },
- { field: "createdTime", title: "创建时间" },
- { field: "updatedTime", title: "最后更新时间", visible: false },
- { field: "drugQuantity", title: "处方取药数量" },
- { field: "reviewStatus", title: "处方审核状态", formatter: function(value, row, index) {
- switch (value) {
- case 0: return "审核不通过";
- case 1: return "审核通过";
- case 2: return "待审核";
- default: return "待审核";
- }
- }
- },
- { field: "drugRoute", title: "用药途径", visible: false },
- { field: "storeId", title: "建档门店ID", visible: false },
- {
- title: '操作',
- align: 'center',
- width: 175,
- formatter: function(value, row, index) {
- if (row.id) {
- var actions = [];
- actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editTab(\'' + row.id + '\')"><i class="fa fa-edit"></i>去登记</a> ');
- actions.push('<a class="btn btn-warning btn-xs ' + queryFlag + '" href="javascript:void(0)" onclick="$.operate.view(\'' + row.id + '\')"><i class="fa fa-eye"></i>详情</a> ');
- actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
- return actions.join('');
- } else {
- return "";
- }
- }
- }]
- };
- $.table.init(options);
- }
- function createOrder() {
- var data = $("#user-form2").serializeArray();
- $.ajax({//写到这里
- cache : true,
- type : "POST",
- url : ctx + "ddgl/ddglorderstore/getRandomOrdersWithMedications",
- data : data,
- async : false,
- error : function(request) {
- $.modal.alertError("失败");
- },
- success : function(data) {
- $.table.refresh();
- }
- });
- }
- function createOrder2() {
- var data = $("#user-form3").serializeArray();
- $.ajax({
- cache : true,
- type : "POST",
- url : ctx + "ddgl/ddglorderstore/getFilteredOrdersWithMedications",
- data : data,
- async : false,
- error : function(request) {
- $.modal.alertError("失败");
- },
- success : function(data) {
- $.table.refresh()
- }
- });
- }
- /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
- function resetPre() {
- resetDate();
- $("#user-form")[0].reset();
- $("#deptId").val("");
- $("#parentId").val("");
- $(".curSelectedNode").removeClass("curSelectedNode");
- $.table.search();
- }
- function resetPre3() {
- $("#user-form3")[0].reset();
- }
- /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
- function resetPre2() {
- $("#user-form2")[0].reset();
- // $("#deptId").val("");
- // $("#parentId").val("");
- // $(".curSelectedNode").removeClass("curSelectedNode");
- }
- </script>
- </body>
- <style>
- .modal {
- display: none;
- position: fixed;
- z-index: 1;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- overflow: auto;
- background-color: rgba(0,0,0,0.4);
- }
- .modalbudan{
- display: none;
- }
- .modal-content {
- background-color: #fefefe;
- margin: 15% auto;
- padding: 20px;
- border: 1px solid #888;
- width: 90%;
- }
- .close {
- color: #aaa;
- float: right;
- font-size: 28px;
- font-weight: bold;
- }
- .close:hover,
- .close:focus {
- color: black;
- text-decoration: none;
- cursor: pointer;
- }
- .error-message {
- color: red;
- display: none;
- }
- </style>
- </html>
|