salesRegistration.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('先销售后登记列表')" />
  5. <th:block th:include="include :: layout-latest-css" />
  6. <th:block th:include="include :: ztree-css" />
  7. </head>
  8. <body class="gray-bg">
  9. <div class="ui-layout-center">
  10. <div class="container-div">
  11. <div class="row">
  12. <div class="col-sm-12 search-collapse">
  13. <div class="query-condition-container">
  14. <h4 class="query-condition-title">查询条件</h4>
  15. <div class="query-buttons">
  16. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  17. <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  18. </div>
  19. </div>
  20. <form id="user-form" class="customize-search-form">
  21. <div class="customize-form-group-container">
  22. <div class="customize-form-group">
  23. <label>患者信息:</label>
  24. <input type="text" class="styled-input" placeholder="请输入患者姓名或手机号" name="query"/>
  25. </div>
  26. <div class="customize-form-group">
  27. <label>销售单号:</label>
  28. <input type="text" class="styled-input" placeholder="请输入销售单号号" name="salesOrderNumber"/>
  29. </div>
  30. <div class="customize-form-group">
  31. <label>药品编码:</label>
  32. <input type="text" class="styled-input" placeholder="请输入药品编码" name="mdmCode"/>
  33. </div>
  34. <div class="customize-form-group">
  35. <label>药品名:</label>
  36. <input type="text" class="styled-input" placeholder="请输入药品名" name="productName"/>
  37. </div>
  38. <!-- <div class="customize-form-group">-->
  39. <!-- <label>处方单号:</label>-->
  40. <!-- <input type="text" class="styled-input" name="prescriptionNumber"/>-->
  41. <!-- </div>-->
  42. <!-- <div class="customize-form-group">-->
  43. <!-- <label>处方类型</label>-->
  44. <!-- <select name="prescriptionType" th:with="type=${@dict.getType('sys_select_prescription_ype')}" class="styled-input">-->
  45. <!-- <option value="">全部</option>-->
  46. <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"-->
  47. <!-- ></option>-->
  48. <!-- </select>-->
  49. <!-- </div>-->
  50. <div class="customize-form-group select-time">
  51. <label>销售日期:</label>
  52. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="sbeginTime"/>
  53. <span>-</span>
  54. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="sendTime"/>
  55. </div>
  56. <div class="customize-form-group">
  57. <label>订单状态</label>
  58. <select name="status" th:with="type=${@dict.getType('sys_select_order_status')}" class="styled-input">
  59. <option value="">全部</option>
  60. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
  61. ></option>
  62. </select>
  63. </div>
  64. </div>
  65. </form>
  66. <form id="user-form2" class="customize-search-form">
  67. <h4>模拟生成销售单</h4>
  68. <div class="customize-form-group">
  69. <label>随机生成几个销售订单:</label>
  70. <input type="number" class="styled-input" placeholder="请输入数字" name="limitNumber" />
  71. <a class="btn btn-primary btn-rounded btn-sm" onclick="createOrder()" shiro:hasPermission="ddgl:dd:add"><i class="fa fa-search"></i>生成订单</a>
  72. <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre2()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  73. </div>
  74. </form>
  75. <!-- <form id="user-form3" class="customize-search-form">-->
  76. <!-- <h4>按条件查询生成指定的订单</h4>-->
  77. <!-- <div class="customize-form-group-container">-->
  78. <!-- <div class="customize-form-group">-->
  79. <!-- <label>患者姓名:</label>-->
  80. <!-- <input type="text" class="styled-input" placeholder="请输入患者姓名" name="patientName"/>-->
  81. <!--&lt;!&ndash; <label>药品编码:</label>&ndash;&gt;-->
  82. <!--&lt;!&ndash; <input type="text" class="styled-input" placeholder="请输入药品编码" name="mdmCode"/>&ndash;&gt;-->
  83. <!-- <label>门店ID:</label>-->
  84. <!-- <input type="text" class="styled-input" placeholder="请输入门店ID" name="storeId"/>-->
  85. <!-- </div>-->
  86. <!-- <div class="customize-form-group select-time">-->
  87. <!-- <label>销售日期:</label>-->
  88. <!-- <input type="text" class="time-input" id="startTime2" placeholder="开始时间" name="startTime"/>-->
  89. <!-- <span>-</span>-->
  90. <!-- <input type="text" class="time-input" id="endTime2" placeholder="结束时间" name="endTime"/>-->
  91. <!-- <a class="btn btn-primary btn-rounded btn-sm" onclick="createOrder2()" shiro:hasPermission="ddgl:dd:add"><i class="fa fa-search"></i>生成订单</a>-->
  92. <!-- <a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre3()"><i class="fa fa-refresh"></i>&nbsp;重置</a>-->
  93. <!-- </div>-->
  94. <!-- </div>-->
  95. <!-- </form>-->
  96. </div>
  97. <div class="btn-group-sm" id="toolbar" role="group">
  98. <!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="dtp:recipe:add">-->
  99. <!-- <i class="fa fa-plus"></i> 处方登记APP-->
  100. <!-- </a>-->
  101. <a class="btn btn-success" onclick="$.operate.addTab2()" shiro:hasPermission="dtp:recipe:add">
  102. <i class="fa fa-plus"></i> 新建登记
  103. </a>
  104. </div>
  105. <div class="col-sm-12 select-table table-striped" style="width: 100%; overflow-x: hidden;">
  106. <table id="bootstrap-table" class="fixed-layout-table"></table>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. <th:block th:include="include :: footer" />
  112. <th:block th:include="include :: layout-latest-js" />
  113. <th:block th:include="include :: bootstrap-table-fixed-columns-js" />
  114. <th:block th:include="include :: ztree-js" />
  115. <script th:inline="javascript">
  116. var editFlag = [[${@permission.hasPermi('dtp:recipe:edit')}]];
  117. var removeFlag = [[${@permission.hasPermi('dtp:recipe:add')}]];
  118. var queryFlag = [[${@permission.hasPermi('dtp:recipe:query')}]];
  119. var prefix = ctx + "dtp/recipe";
  120. var prefix_pmService = ctx + "dtp/pmService";
  121. $(function() {
  122. var panehHidden = false;
  123. if ($(this).width() < 1590) {
  124. panehHidden = true;
  125. }
  126. $('body').layout({ initClosed: panehHidden, west__size: 185, resizeWithWindow: false });
  127. // 回到顶部绑定
  128. if ($.fn.toTop !== undefined) {
  129. var opt = {
  130. win:$('.ui-layout-center'),
  131. doc:$('.ui-layout-center')
  132. };
  133. $('#scroll-up').toTop(opt);
  134. }
  135. queryUserList();
  136. });
  137. $(document).ready(function() {
  138. });
  139. function queryUserList() {
  140. var options = {
  141. url: prefix + "/salesList",
  142. viewUrl: prefix + "/viewInfo/{id}",
  143. createUrl: prefix + "/add",
  144. createUrl2: prefix + "/newRecipe",
  145. updateUrl: prefix + "/viewEditInfo/{id}",
  146. removeUrl: prefix + "/remove",
  147. exportUrl: prefix + "/export",
  148. //importUrl: prefix + "/importData",
  149. importTemplateUrl: prefix + "/importTemplate",
  150. sortName: "id",
  151. sortOrder: "desc",
  152. modalName: "处方登记信息",
  153. fitColumns: true,
  154. striped: true,
  155. autoRowHeight: true,
  156. rowNumbers: true,
  157. showFooter:true, //是否显示表格底部区域。
  158. clickToSelect: true, //是否启用点击行时选中整行的功能。
  159. singleSelect: true, //是否仅允许选择一行
  160. fixedColumns: true,
  161. //fixedNumber: 3,
  162. fixedRightNumber: 1,
  163. columns: [{
  164. checkbox: true
  165. }, {field: "id",title: "ID",visible: false},
  166. { field: "mdmCode", title: "药品编码" },
  167. { field: "prescriptionNumber", title: "处方单号" },
  168. { field: "salesOrderNumber", title: "销售单号" },
  169. { field: "status", title: "状态", formatter: function(value, row, index) {
  170. switch (value) {
  171. case 1: return "订单已完成";
  172. case 2: return "待上传处方";
  173. case 3: return "待确认信息";
  174. case 4: return "待处方登记";
  175. case 5: return "待订单销售";
  176. case 6: return "待绑定患者";
  177. case 7: return "处方已完成";
  178. case 8: return "订单已退款";
  179. case 9: return "退款中";
  180. case 10: return "已取消";
  181. case 11: return "待支付";
  182. case 12: return "已支付";
  183. default: return "待确认信息";
  184. }
  185. }
  186. },
  187. { field: "saleDate", title: "销售日期" },
  188. { field: "prescriptionIssueDate", title: "处方开具日期" },
  189. { field: "registrationDate", title: "处方登记日期" },
  190. { field: "administrationMethod", title: "给药方式" },
  191. { field: "productName", title: "商品名称" },
  192. { field: "genericName", title: "通用名称" },
  193. { field: "specification", title: "规格" },
  194. { field: "drug_batch_number", title: "药品批号", visible: true },
  195. { field: "sales_storeCode", title: "销售门店编码", visible: true },
  196. { field: "sales_storeName", title: "销售门店名称", visible: true },
  197. { field: "patientName", title: "患者姓名" },
  198. { field: "gender", title: "性别", formatter: function(value, row, index) {
  199. switch (value) {
  200. case 0: return "男";
  201. case 1: return "女";
  202. default: return "未知";
  203. }
  204. }
  205. },
  206. { field: "age", title: "年龄" },
  207. { field: "patientPhone", title: "患者手机号" },
  208. { field: "storeName", title: "建档门店", visible: true },
  209. { field: "createdTime", title: "创建时间" },
  210. { field: "updatedTime", title: "最后更新时间", visible: false },
  211. { field: "drugQuantity", title: "处方取药数量" },
  212. { field: "reviewStatus", title: "处方审核状态", formatter: function(value, row, index) {
  213. switch (value) {
  214. case 0: return "审核不通过";
  215. case 1: return "审核通过";
  216. case 2: return "待审核";
  217. default: return "待审核";
  218. }
  219. }
  220. },
  221. { field: "drugRoute", title: "用药途径", visible: false },
  222. { field: "storeId", title: "建档门店ID", visible: false },
  223. {
  224. title: '操作',
  225. align: 'center',
  226. width: 175,
  227. formatter: function(value, row, index) {
  228. if (row.id) {
  229. var actions = [];
  230. 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> ');
  231. 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> ');
  232. 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> ');
  233. return actions.join('');
  234. } else {
  235. return "";
  236. }
  237. }
  238. }]
  239. };
  240. $.table.init(options);
  241. }
  242. function createOrder() {
  243. var data = $("#user-form2").serializeArray();
  244. $.ajax({//写到这里
  245. cache : true,
  246. type : "POST",
  247. url : ctx + "ddgl/ddglorderstore/getRandomOrdersWithMedications",
  248. data : data,
  249. async : false,
  250. error : function(request) {
  251. $.modal.alertError("失败");
  252. },
  253. success : function(data) {
  254. $.table.refresh();
  255. }
  256. });
  257. }
  258. function createOrder2() {
  259. var data = $("#user-form3").serializeArray();
  260. $.ajax({
  261. cache : true,
  262. type : "POST",
  263. url : ctx + "ddgl/ddglorderstore/getFilteredOrdersWithMedications",
  264. data : data,
  265. async : false,
  266. error : function(request) {
  267. $.modal.alertError("失败");
  268. },
  269. success : function(data) {
  270. $.table.refresh()
  271. }
  272. });
  273. }
  274. /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
  275. function resetPre() {
  276. resetDate();
  277. $("#user-form")[0].reset();
  278. $("#deptId").val("");
  279. $("#parentId").val("");
  280. $(".curSelectedNode").removeClass("curSelectedNode");
  281. $.table.search();
  282. }
  283. function resetPre3() {
  284. $("#user-form3")[0].reset();
  285. }
  286. /* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
  287. function resetPre2() {
  288. $("#user-form2")[0].reset();
  289. // $("#deptId").val("");
  290. // $("#parentId").val("");
  291. // $(".curSelectedNode").removeClass("curSelectedNode");
  292. }
  293. </script>
  294. </body>
  295. <style>
  296. .modal {
  297. display: none;
  298. position: fixed;
  299. z-index: 1;
  300. left: 0;
  301. top: 0;
  302. width: 100%;
  303. height: 100%;
  304. overflow: auto;
  305. background-color: rgba(0,0,0,0.4);
  306. }
  307. .modalbudan{
  308. display: none;
  309. }
  310. .modal-content {
  311. background-color: #fefefe;
  312. margin: 15% auto;
  313. padding: 20px;
  314. border: 1px solid #888;
  315. width: 90%;
  316. }
  317. .close {
  318. color: #aaa;
  319. float: right;
  320. font-size: 28px;
  321. font-weight: bold;
  322. }
  323. .close:hover,
  324. .close:focus {
  325. color: black;
  326. text-decoration: none;
  327. cursor: pointer;
  328. }
  329. .error-message {
  330. color: red;
  331. display: none;
  332. }
  333. </style>
  334. </html>