Selaa lähdekoodia

Merge branch 'release/PDA-1.2.1'

cc12458 9 kuukautta sitten
vanhempi
commit
308d6cf1d3
100 muutettua tiedostoa jossa 2869 lisäystä ja 878 poistoa
  1. 2 0
      .gitignore
  2. 103 0
      src/api/decoct/index.js
  3. 3 1
      src/api/drugs/alias.js
  4. 5 3
      src/api/drugs/drugs.js
  5. 3 1
      src/api/drugs/modifyPrice.js
  6. 3 1
      src/api/drugs/place.js
  7. 3 1
      src/api/drugs/price.js
  8. 3 1
      src/api/drugs/specs.js
  9. 3 1
      src/api/inventory/SystemWin.js
  10. 3 1
      src/api/inventory/forward.js
  11. 35 4
      src/api/inventory/inventory.js
  12. 3 1
      src/api/inventory/modifyPrice.js
  13. 3 1
      src/api/inventory/reporting.js
  14. 3 1
      src/api/inventory/takeInventory.js
  15. 3 1
      src/api/inventory/warehouse.js
  16. 3 1
      src/api/inventory/warehousing.js
  17. 3 1
      src/api/medical/community.js
  18. 3 1
      src/api/medical/dept.js
  19. 3 1
      src/api/medical/log.js
  20. 3 1
      src/api/monitor/job.js
  21. 3 1
      src/api/monitor/jobLog.js
  22. 3 1
      src/api/monitor/logininfor.js
  23. 3 1
      src/api/monitor/operlog.js
  24. 13 2
      src/api/pda/index.js
  25. 3 1
      src/api/pharmacy/mechanism.js
  26. 3 1
      src/api/pharmacy/prescription.js
  27. 3 1
      src/api/pharmacy/storage.js
  28. 3 1
      src/api/pharmacy/supplier.js
  29. 1 0
      src/api/prescription/prescriptionAudit.js
  30. 13 1
      src/api/prescription/prescriptionCore.js
  31. 6 1
      src/api/select-page.js
  32. 3 1
      src/api/system/config.js
  33. 3 1
      src/api/system/dict/data.js
  34. 3 1
      src/api/system/dict/type.js
  35. 3 1
      src/api/system/post.js
  36. 3 1
      src/api/system/role.js
  37. 4 2
      src/api/system/supplier.js
  38. 6 2
      src/api/system/user.js
  39. 137 12
      src/components/print/express_75.vue
  40. 76 25
      src/components/print/recipe_A5.vue
  41. 69 25
      src/components/print/tag_60_40.vue
  42. 69 27
      src/components/print/tag_80_50.vue
  43. 73 25
      src/components/print/ticket_72.vue
  44. 12 2
      src/components/selectTable/selectOutTable.vue
  45. 11 3
      src/components/selectTable/selectTable.vue
  46. 0 0
      src/libs/print/SCPPrint-2.7.1.js
  47. 4 0
      src/main.js
  48. 35 18
      src/tools/print.tool.js
  49. 17 5
      src/utils/request.js
  50. 4 1
      src/utils/ruoyi.js
  51. 18 0
      src/utils/zipdownload.js
  52. 214 0
      src/views/decoct/bucket.vue
  53. 15 2
      src/views/decoct/device/components/edit.vue
  54. 312 0
      src/views/decoct/route.vue
  55. 481 0
      src/views/decoct/station.vue
  56. 12 16
      src/views/drugs/alias/index.vue
  57. 12 16
      src/views/drugs/drugs/index.vue
  58. 0 19
      src/views/drugs/map/index.vue
  59. 14 18
      src/views/drugs/modifyPrice/index.vue
  60. 12 16
      src/views/drugs/place/index.vue
  61. 10 11
      src/views/drugs/price/index.vue
  62. 10 11
      src/views/drugs/specs/index.vue
  63. 12 16
      src/views/inventory/SystemWin/index.vue
  64. 12 16
      src/views/inventory/drugDirectory/index.vue
  65. 12 16
      src/views/inventory/forward/index.vue
  66. 12 17
      src/views/inventory/inventory/index.vue
  67. 12 16
      src/views/inventory/inventoryWarning/index.vue
  68. 12 16
      src/views/inventory/modifyPrice/index.vue
  69. 12 16
      src/views/inventory/reporting/index.vue
  70. 12 16
      src/views/inventory/takeInventory/index.vue
  71. 12 15
      src/views/inventory/warehouse/index.vue
  72. 12 16
      src/views/inventory/warehousing/index.vue
  73. 12 16
      src/views/medical/community/index.vue
  74. 13 17
      src/views/medical/dept/index.vue
  75. 12 16
      src/views/medical/log/index.vue
  76. 10 11
      src/views/monitor/job/index.vue
  77. 10 11
      src/views/monitor/job/log.vue
  78. 10 11
      src/views/monitor/logininfor/index.vue
  79. 12 16
      src/views/monitor/operlog/index.vue
  80. 44 3
      src/views/pda/dispatch/index.vue
  81. 2 2
      src/views/pda/dispatch/printContainer.vue
  82. 119 0
      src/views/pda/dispatch/scanPanel.vue
  83. 47 45
      src/views/pharmacy/mechanism/index.vue
  84. 20 20
      src/views/pharmacy/prescription/index.vue
  85. 13 17
      src/views/pharmacy/storage/index.vue
  86. 13 17
      src/views/pharmacy/supplier/index.vue
  87. 48 16
      src/views/pharmacyManagement/business/deploy/index.vue
  88. 12 16
      src/views/pharmacyManagement/business/drugDirectory/index.vue
  89. 13 17
      src/views/pharmacyManagement/business/expiryDateEnquiry/index.vue
  90. 12 16
      src/views/pharmacyManagement/business/putPosition/index.vue
  91. 2 4
      src/views/reportManagement/dispensing/index.vue
  92. 2 4
      src/views/reportManagement/expenditure/index.vue
  93. 2 4
      src/views/reportManagement/put-in-stock/index.vue
  94. 185 0
      src/views/reportManagement/transport/index.vue
  95. 12 16
      src/views/rescription/Dispensing/index.vue
  96. 108 48
      src/views/rescription/prescriptionCore/edit.vue
  97. 23 16
      src/views/rescription/prescriptionCore/index.vue
  98. 17 10
      src/views/rescription/prescriptionCore/printContainer.vue
  99. 75 38
      src/views/rescription/prescriptionReception/edit.vue
  100. 12 16
      src/views/system/config/index.vue

+ 2 - 0
.gitignore

@@ -21,3 +21,5 @@ selenium-debug.log
 
 package-lock.json
 yarn.lock
+
+six.pharmacy**.zip

+ 103 - 0
src/api/decoct/index.js

@@ -0,0 +1,103 @@
+import request from '@/utils/request';
+
+// 查询待行区列表
+export function listDecoctRoute(query) {
+  const {pageNum, pageSize, ...data} = query;
+  return request({
+    url: `/yfc-admin/web/waiting/pageList`,
+    method: 'post',
+    data,
+    params: {pageNum, pageSize},
+  });
+}
+
+export function editDecoctRoute(model) {
+  if (typeof model.createTime === 'string') model.createTime = model.createTime.replace(' ', 'T');
+  if (typeof model.updateTime === 'string') model.updateTime = model.updateTime.replace(' ', 'T');
+  return request({
+    url: model.id ? `/yfc-admin/web/waiting/update` : `/yfc-admin/web/waiting/add`,
+    method: 'post',
+    data: model,
+  });
+}
+
+export function deleteDecoctRoute(model) {
+  return request({
+    url: `/yfc-admin/web/waiting/delete/${model.id}`,
+    method: 'get',
+  });
+}
+
+export function getDecoctRouteOptions() {
+  return request({
+    url: `/yfc-admin/web/waiting/list`,
+    method: 'post',
+    data: {},
+  })
+}
+
+// 查询煎药区列表
+export function listDecoctStation(query) {
+  const {pageNum, pageSize, ...data} = query;
+  return request({
+    url: `/yfc-admin/web/decoction/pageList`,
+    method: 'post',
+    data,
+    params: {pageNum, pageSize},
+  });
+}
+
+export function editDecoctStation(model) {
+  if (typeof model.createTime === 'string') model.createTime = model.createTime.replace(' ', 'T');
+  if (typeof model.updateTime === 'string') model.updateTime = model.updateTime.replace(' ', 'T');
+  return request({
+    url: model.id ? `/yfc-admin/web/decoction/update` : `/yfc-admin/web/decoction/add`,
+    method: 'post',
+    data: model,
+  });
+}
+
+export function deleteDecoctStation(model) {
+  return request({
+    url: `/yfc-admin/web/decoction/delete/${model.id}`,
+    method: 'get',
+  });
+}
+
+
+export function getDecoctStationOptions() {
+  return request({
+    url: `/yfc-admin/web/decoction/list`,
+    method: 'post',
+    data: {},
+  })
+}
+
+export function getDecoctOperatorList() {
+  return request({
+    url: `/system/user/decoctUserList`,
+    method: 'get'
+  })
+}
+
+// 查询绑桶记录列表
+export function listDecoctBucket(query) {
+  const {pageNum, pageSize, ...data} = query;
+  return request({
+    url: `/yfc-admin/web/decoction/bindBarrelList`,
+    method: 'post',
+    data,
+    params: {pageNum, pageSize},
+  });
+}
+
+export function exportDecoctBucket(query) {
+  const {pageNum, pageSize, ...data} = query;
+  return request({
+    url: `/yfc-admin/web/decoction/bindBarrelExcel`,
+    method: 'post',
+    data,
+    responseType: 'blob',
+    download: true,
+  })
+}

+ 3 - 1
src/api/drugs/alias.js

@@ -48,7 +48,9 @@ export function exportAlias(query) {
   return request({
     url: '/yfc-admin/drugs/alias/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 5 - 3
src/api/drugs/drugs.js

@@ -48,7 +48,9 @@ export function exportDrugs(query) {
   return request({
     url: '/yfc-admin/drugs/drugs/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 
@@ -103,7 +105,7 @@ export function drugsMapImportTemplate() {
     url: '/yfc-admin/medicalHerbsManage/downloadImportTemplate',
     method: 'post',
     responseType: 'blob',
-    fileType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8',
+    download: true,
   })
 }
 
@@ -113,7 +115,7 @@ export function drugsMapExport(query) {
     method: 'post',
     data: query,
     responseType: 'blob',
-    fileType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/drugs/modifyPrice.js

@@ -48,7 +48,9 @@ export function exportTrimPrice(query) {
   return request({
     url: '/yfc-admin/drugs/TrimPrice/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/drugs/place.js

@@ -48,6 +48,8 @@ export function exportPlace(query) {
   return request({
     url: '/yfc-admin/drugs/place/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/drugs/price.js

@@ -48,6 +48,8 @@ export function exportPrice(query) {
   return request({
     url: '/yfc-admin/drugs/price/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/drugs/specs.js

@@ -57,6 +57,8 @@ export function exportSpecs(query) {
   return request({
     url: '/yfc-admin/drugs/specs/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/inventory/SystemWin.js

@@ -48,7 +48,9 @@ export function exportSystemWin(query) {
   return request({
     url: '/yfc-admin/inventory/SystemWin/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/inventory/forward.js

@@ -64,7 +64,9 @@ export function exportForward(query) {
   return request({
     url: '/yfc-admin/inventory/forward/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 35 - 4
src/api/inventory/inventory.js

@@ -68,7 +68,9 @@ export function exportInventory(query) {
   return request({
     url: '/yfc-admin/inventory/inventory/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 
@@ -121,7 +123,9 @@ export function getWarehousingAndWarehouseExport(query) {
   return request({
     url: '/yfc-admin/inventory/inventory/getWarehousingAndWarehouseExport',
     method: "get",
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 // 药品账簿汇总
@@ -153,7 +157,9 @@ export function reportExport(query) {
   return request({
     url: '/yfc-admin/inventory/inventory/reportExport',
     method: "get",
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 // 收支月报导出
@@ -177,6 +183,31 @@ export function fySummaryExport(query) {
   return request({
     url: '/yfc-admin/prescription/prescriptionCore/fySummaryExport',
     method: "get",
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
+  })
+}
+// 运输明细报表
+export function getTransportReport(query) {
+  return request({
+    url: '/yfc-admin/prescriptionManage/transportPage',
+    method: 'post',
+    data: query,
+    params: {
+      pageNum: query.pageNum,
+      pageSize: query.pageSize,
+    },
+  })
+}
+// 运输明细报表导出
+export function exportTransportReport(query) {
+  const {pageNum, pageSize, ...data} = query;
+  return request({
+    url: '/yfc-admin/prescriptionManage/exportTransport',
+    method: 'post',
+    data,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/inventory/modifyPrice.js

@@ -48,7 +48,9 @@ export function exportModifyPrice(query) {
   return request({
     url: '/yfc-admin/inventory/modifyPrice/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/inventory/reporting.js

@@ -48,7 +48,9 @@ export function exportReporting(query) {
   return request({
     url: '/yfc-admin/inventory/reporting/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/inventory/takeInventory.js

@@ -48,7 +48,9 @@ export function exportTakeInventory(query) {
   return request({
     url: '/yfc-admin/inventory/takeInventory/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/inventory/warehouse.js

@@ -48,7 +48,9 @@ export function exportWarehouse(query) {
   return request({
     url: '/yfc-admin/inventory/warehouse/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/inventory/warehousing.js

@@ -48,7 +48,9 @@ export function exportWarehousing(query) {
   return request({
     url: '/yfc-admin/inventory/warehousing/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/medical/community.js

@@ -48,6 +48,8 @@ export function exportCommunity(query) {
   return request({
     url: '/yfc-admin/medical/community/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/medical/dept.js

@@ -56,6 +56,8 @@ export function exportDept(query) {
   return request({
     url: '/yfc-admin/medical/dept/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/medical/log.js

@@ -48,6 +48,8 @@ export function exportLog(query) {
   return request({
     url: '/yfc-admin/medical/log/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/monitor/job.js

@@ -48,7 +48,9 @@ export function exportJob(query) {
   return request({
     url: '/monitor/job/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/monitor/jobLog.js

@@ -30,6 +30,8 @@ export function exportJobLog(query) {
   return request({
     url: '/monitor/jobLog/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/monitor/logininfor.js

@@ -30,6 +30,8 @@ export function exportLogininfor(query) {
   return request({
     url: '/system/logininfor/export',
     method: 'post',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/monitor/operlog.js

@@ -30,6 +30,8 @@ export function exportOperlog(query) {
   return request({
     url: '/system/operlog/export',
     method: 'post',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 13 - 2
src/api/pda/index.js

@@ -12,8 +12,7 @@ export function packTwiceList(query) {
 }
 
 export function dispatchList(query) {
-  const {pageNum, pageSize, date, ...data} = query;
-  if (Array.isArray(date)) [data.startTime, data.endTime = data.startTime] = date;
+  const {pageNum, pageSize, ...data} = query;
   return request({
     url: '/yfc-admin/prescriptionManage/resFlowPage',
     method: 'post',
@@ -21,3 +20,15 @@ export function dispatchList(query) {
     params: {pageNum, pageSize},
   })
 }
+
+// 物流管理报表导出
+export function exportDispatchReport(query) {
+  const {pageNum, pageSize, ...data} = query;
+  return request({
+    url: '/yfc-admin/prescriptionManage/exportResFlow',
+    method: 'post',
+    data,
+    responseType: 'blob',
+    download: true,
+  })
+}

+ 3 - 1
src/api/pharmacy/mechanism.js

@@ -48,6 +48,8 @@ export function exportMechanism(query) {
   return request({
     url: '/yfc-admin/pharmacy/mechanism/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/pharmacy/prescription.js

@@ -48,6 +48,8 @@ export function exportPrescription(query) {
   return request({
     url: '/yfc-admin/pharmacy/prescription/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/pharmacy/storage.js

@@ -48,7 +48,9 @@ export function exportStorage(query) {
   return request({
     url: '/yfc-admin/pharmacy/storage/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/pharmacy/supplier.js

@@ -48,6 +48,8 @@ export function exportSupplier(query) {
   return request({
     url: '/yfc-admin/pharmacy/supplier/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 1 - 0
src/api/prescription/prescriptionAudit.js

@@ -42,6 +42,7 @@ export function selectOrderDetail2(query) {
         total: data['packageNumber'],
         category: data['dosageForm'],
         method: data['prescriptionusage'],
+        usageMethod: data['usageMethod'],
         volume: data['concentration'] && `每次${data['concentration']}`,
         totalVolume: data['packageDose'],
         frequency: data['frequency'],

+ 13 - 1
src/api/prescription/prescriptionCore.js

@@ -186,12 +186,22 @@ export function getPrescriptionCore2(id) {
       medicines: oralPreItemList.map(item => {
         return Object.assign(item, {
           drugsSpecsName: item.drugsSpecsName || item.ypggCenter || item.ypggHis,
+          drugMark: +item.drugMark !== 0 ? item.drugMark.toString() : void 0,
+          invalid: !item.matCode,
         });
       }),
     };
   });
 }
 
+export function editPrescriptionCore2(model) {
+  return request({
+    url: '/yfc-admin/prescription/prescriptionCore/updateLogistics',
+    method: 'post',
+    data: model,
+  });
+}
+
 export function getPrescriptionRS(id, medicines, {hidePregnant = false} = {}) {
   const hack = request({
     url: 'http://121.43.162.141/yf/knowlib/getYfMatInfo',
@@ -341,7 +351,9 @@ export function exportPrescriptionCore(query) {
   return request({
     url: '/yfc-admin/prescription/prescriptionCore/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 6 - 1
src/api/select-page.js

@@ -1,8 +1,13 @@
 import {drugsSearchForMechanism, drugsSearchForSystem} from "@/api/drugs/drugs";
 
+let drugsSearchForSystemCache = new Map();
+
 export default {
   'drugsSearchForSystem': (query) => {
-    return drugsSearchForSystem({name: query.name || ''})
+    const name = query.name || '';
+    if (drugsSearchForSystemCache.size > 100) drugsSearchForSystemCache.clear();
+    if (!drugsSearchForSystemCache.has(name)) drugsSearchForSystemCache.set(name, drugsSearchForSystem({name}));
+    return drugsSearchForSystemCache.get(name);
   },
   'drugsSearchForMechanism': (query) => {
     return drugsSearchForMechanism({

+ 3 - 1
src/api/system/config.js

@@ -64,6 +64,8 @@ export function exportConfig(query) {
   return request({
     url: '/system/config/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/system/dict/data.js

@@ -56,6 +56,8 @@ export function exportData(query) {
   return request({
     url: '/system/dict/data/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/system/dict/type.js

@@ -56,7 +56,9 @@ export function exportType(query) {
   return request({
     url: '/system/dict/type/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 3 - 1
src/api/system/post.js

@@ -48,6 +48,8 @@ export function exportPost(query) {
   return request({
     url: '/system/post/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }

+ 3 - 1
src/api/system/role.js

@@ -70,7 +70,9 @@ export function exportRole(query) {
   return request({
     url: '/system/role/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 4 - 2
src/api/system/supplier.js

@@ -48,6 +48,8 @@ export function exportSupplier(query) {
   return request({
     url: '/system/supplier/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
-}
+}

+ 6 - 2
src/api/system/user.js

@@ -49,7 +49,9 @@ export function exportUser(query) {
   return request({
     url: '/system/user/export',
     method: 'get',
-    params: query
+    params: query,
+    responseType: 'blob',
+    download: true,
   })
 }
 
@@ -122,7 +124,9 @@ export function uploadAvatar(data) {
 export function importTemplate() {
   return request({
     url: '/system/user/importTemplate',
-    method: 'get'
+    method: 'get',
+    responseType: 'blob',
+    download: true,
   })
 }
 

+ 137 - 12
src/components/print/express_75.vue

@@ -1,13 +1,22 @@
 <script>
-import {sf_express_print} from '@/tools/print.tool';
+import {getDevice, getDevices, sf_express_print} from '@/tools/print.tool';
 import {getExpressRecordParams} from '@/api/prescription/prescriptionAudit';
+import {editPrescriptionCore2, getPrescriptionCore2} from '@/api/prescription/prescriptionCore';
+import regionOptions from '@/utils/options';
 
 export default {
   name: 'print_express_75',
   props: {
     id: {type: [String, Number], required: true},
+    selectable: Boolean,
   },
   data() {
+    const locationValidator = (message) => (rule, value, callback) => {
+      if (this.dataset.expressExecutor === '顺丰') {
+        if (!value.length || (typeof value === 'string' && !value.trim())) { return callback(new Error(message)); }
+      }
+      callback();
+    };
     return {
       loaded: false,
       preview: true,
@@ -18,26 +27,61 @@ export default {
 
       model: null,
       device: null,
+      devices: [],
       printing: false,
+
+      submitting: false,
+      editable: false,
+      expressPayTypeOptions: [],
+      expressDechOptions: [],
+      regionOptions,
+      dataset: {},
+      rules: {
+        expressExecutor: [{required: true, message: '请选择配送方式'}],
+        consignee: [{validator: locationValidator('请输入收件人')}],
+        contactNumber: [{validator: locationValidator('请输入收件电话')}],
+        // location: [{validator: locationValidator('请选择所属地域')}],
+        address: [{validator: locationValidator('请输入详细地址')}],
+      },
     };
   },
   computed: {
     loading() {
       return !this.loaded || !this.preview;
     },
+    deviceId() {
+      return this.device ? this.device.index : '';
+    }
   },
   mounted() {
-    // this.print(true);
+    if (this.selectable) getDevices().then(devices => this.devices = devices);
   },
   methods: {
     async print(preview = false) {
+      if (preview) this.loaded = false;
       try {
-        await this.getModel();
+        const device = await this.getDevice();
+
         if (preview) {
+          this.getDicts('express_dech').then((response) => {this.expressDechOptions = response.data;});
+          this.getDicts('express_pay_type').then((response) => {this.expressPayTypeOptions = response.data;});
+          const {id, ...model} = await getPrescriptionCore2(this.$props.id);
+          this.dataset = {
+            id,
+            location: model.location,
+            consignee: model.consignee,
+            contactNumber: model.contactNumber,
+            address: model.address,
+            expressDech: model.expressDech,
+            expressPayType: model.expressPayType,
+            expressExecutor: model.expressExecutor,
+          };
 
+          if (device == null) await getDevices();
         } else {
           this.printing = true;
-          await sf_express_print(this.model);
+          await this.getModel();
+          await sf_express_print(this.model, {}, device);
         }
       } catch (e) {}
       this.printing = false;
@@ -51,24 +95,101 @@ export default {
     async getModel() {
       if (this.model) return this.model;
       return getExpressRecordParams({prescriptionCoreId: this.id}).then((res) => {
-        console.log(res);
         this.model = res.data;
         return this.model;
       });
     },
+
+    async getDevice() {
+      if (!this.device) this.device = await getDevice(
+        `name: Six:${this.paper}`,
+        `driver: RP4xx Series 200DPI TSC; paper: ${this.paper}`,
+        `paper:${this.paper}`,
+        `driver: RP4xx Series 200DPI TSC;`,
+      );
+      return this.device;
+    },
+
+    selected(value) {
+      this.device = this.devices.find(device => device.index === value);
+    },
+
+    async save() {
+      try {
+        await this.$refs.form.validate()
+        this.submitting = true;
+        const {location = [], ...model} = this.dataset;
+        [model.province = '', model.city = '', model.region = ''] = location;
+        await editPrescriptionCore2(model);
+        this.$message.success(`修改成功`);
+      } catch (e) {
+        if (e === false) this.$message.warning('请补全表单');
+      }
+      this.submitting = false;
+    },
   },
 };
 </script>
 
 <template>
   <div class="print-preview" v-loading="loading">
-    <!--    <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}"></div>-->
-    <!--    <iframe :id="tag" @load="delay"></iframe>-->
-    <div style="display: flex; align-items: center; justify-content: space-evenly;">
-      <el-button style="width: 100%;" type="primary" :loading="printing" @click="printing = true;print()">
-        打印
-      </el-button>
-    </div>
+    <el-form ref="form" :model="dataset" :rules="rules" label-position="right" label-width="auto" style="margin: 24px 0;" @submit.native.prevent="save()">
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="收件人" prop="consignee">
+            <el-input v-model="dataset.consignee" placeholder="请输入收件人" :disabled="!editable || submitting"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="收件电话" prop="contactNumber">
+            <el-input type="tel" v-model="dataset.contactNumber" placeholder="请输入收件电话" minlength="11"
+                      maxlength="11" :disabled="!editable || submitting"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24" style="display: flex;">
+          <el-form-item label="收件地址" prop="location">
+            <el-cascader v-model="dataset.location" :options="regionOptions" :props="{ value: 'label' }"
+                         placeholder="请选择省/市/区" clearable :disabled="!editable || submitting"></el-cascader>
+          </el-form-item>
+          <el-form-item label-width="4px" prop="address" style="flex: auto;">
+            <el-input v-model="dataset.address" placeholder="请输入详细地址" :disabled="!editable || submitting"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24" style="display: flex;">
+          <el-form-item style="flex-basis: 30%;" label="结算方式" prop="expressDech">
+            <el-select v-model="dataset.expressDech" placeholder="顺丰标快" clearable
+                       :disabled="!editable || submitting">
+              <el-option v-for="item in expressDechOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item style="flex-basis: 30%;" label-width="4px" label="" prop="expressPayType">
+            <el-select v-model="dataset.expressPayType" placeholder="月结" clearable
+                       :disabled="!editable || submitting">
+              <el-option v-for="item in expressPayTypeOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <div style="display: flex; align-items: center; justify-content: space-evenly;">
+        <template v-if="editable">
+          <el-button style="flex: 1;" :disabled="submitting" @click="editable = false;">取消</el-button>
+          <el-button style="flex: 1;" type="primary" :loading="submitting" native-type="submit">保存</el-button>
+        </template>
+        <template v-else>
+          <el-button style="flex: 1;" @click="editable = true;">编辑</el-button>
+          <el-select v-if="devices.length" placeholder="打印机" :value="deviceId" @change="selected">
+            <el-option v-for="item in devices" :key="item.index" :label="item.name" :value="item.index"></el-option>
+          </el-select>
+          <el-button style="flex: 3;" type="primary" :loading="printing" @click="printing = true;print()">
+            打印
+          </el-button>
+        </template>
+      </div>
+    </el-form>
   </div>
 </template>
 
@@ -92,5 +213,9 @@ export default {
   > div {
     flex: none;
   }
+
+  .el-select {
+    margin: 0 12px;
+  }
 }
 </style>

+ 76 - 25
src/components/print/recipe_A5.vue

@@ -1,6 +1,6 @@
 <script>
 import CLodop from '@/libs/print/CLodop';
-import {getDevice} from '@/tools/print.tool';
+import {getDevice, getDevices} from '@/tools/print.tool';
 import {templateA5} from '@/components/print/template';
 import {selectOrderDetail, selectOrderDetail2} from '@/api/prescription/prescriptionAudit';
 import {bignumber, chain, multiply} from 'mathjs';
@@ -9,6 +9,7 @@ export default {
   name: 'print_recipe_a5',
   props: {
     id: {type: [String, Number], required: true},
+    selectable: Boolean,
   },
   data() {
     return {
@@ -18,9 +19,12 @@ export default {
 
       tag: `print-preview_${Date.now()}`,
       paper: '中药处方笺',
+      paperWidth: 1485,
+      paperHeight: 2100,
 
       model: null,
       device: null,
+      devices: [],
       printing: false,
     };
   },
@@ -28,39 +32,47 @@ export default {
     loading() {
       return !this.loaded || !this.preview;
     },
+    deviceId() {
+      return this.device ? this.device.index : '';
+    },
   },
   mounted() {
-    // this.print(true);
+    if (this.selectable) getDevices().then(devices => this.devices = devices);
+    this.loaded = true;
   },
   methods: {
     async print(preview = false) {
+      if (preview) this.loaded = false;
+
       const instance = await CLodop();
       const model = await this.getModel();
 
       templateA5.call(instance, model, `${this.paper}`);
 
-      this.device = await getDevice(`paper:${this.paper}`);
-      if (this.device) instance['SET_PRINT_PAGESIZE'](1, 0, 0, this.paper);
-      else {
-        this.device = await getDevice({width: 559, height: 794}, `name:Canon LBP`);
-        if (this.device) instance['SET_PRINT_PAGESIZE'](1, '148mm', '210mm', 'CreateCustomPage');
-      }
-      if (this.device) instance['SET_PRINTER_INDEX'](this.device.index);
-
-      instance['SET_PRINT_COPIES'](this.total);
-
-      if (preview) {
-        instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
-        instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
-        instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
-        instance['PREVIEW'](this.tag);
-      } else if (this.device) {
-        if (instance['PRINT']()) this.complete();
-        else this.$message.warning(`请检查打印机 (${this.device.name})`);
+      const device = await this.getDevice();
+      if (device) {
+        if (device.papers.includes(this.paper)) instance['SET_PRINT_PAGESIZE'](1, 0, 0, this.paper);
+        else instance['SET_PRINT_PAGESIZE'](1, this.paperWidth, this.paperHeight, 'CreateCustomPage');
+
+        instance['SET_PRINTER_INDEX'](device.index);
+        instance['SET_PRINT_COPIES'](this.total);
+
+        if (preview) {
+          instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
+          instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
+          instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
+          instance['PREVIEW'](this.tag);
+        } else {
+          if (instance['PRINT']()) this.complete();
+          else this.$message.warning(`请检查打印机 (${this.device.name})`);
+        }
+      } else if (preview) {
+        this.devices = await getDevices();
       } else {
         if (instance['PRINTA']()) this.complete();
         else this.$message.warning(`请检查打印机`);
       }
+
       this.printing = false;
       this.loaded = true;
     },
@@ -86,17 +98,44 @@ export default {
 
       return this.model;
     },
+
+    async getDevice() {
+      if (!this.device) this.device = await getDevice(
+        `name: Six:${this.paper}`,
+        `name: Six:${this.paperWidth}*${this.paperHeight}`,
+        `driver: Canon LBP6030/6040/6018L; paper: ${this.paper}`,
+        `driver: Canon LBP6030/6040/6018L; form: A5`,
+        `driver: Canon LBP6030/6040/6018L;`,
+        {width: this.paperWidth, height: this.paperHeight},
+        `paper:${this.paper}`,
+        `form: A5`,
+      );
+      console.log(this.device);
+      return this.device;
+    },
+
+    selected(value) {
+      this.device = this.devices.find(device => device.index === value);
+      this.print(true);
+    },
   },
 };
 </script>
 
 <template>
-  <div class="print-preview" v-loading="loading">
-    <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}"></div>
-    <iframe :id="tag" @load="delay"></iframe>
+  <div class="print-preview">
+    <div class="content" v-loading="loading">
+      <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}">
+        {{ device && device.name }}
+      </div>
+      <iframe :id="tag" @load="delay"></iframe>
+    </div>
     <div style="display: flex; align-items: center; justify-content: space-evenly;">
-      <el-button style="width: 100%;" type="primary" :loading="printing" @click="printing = true;print()">
-        打印
+      <el-select v-if="devices.length" placeholder="打印机" :value="deviceId" @change="selected">
+        <el-option v-for="item in devices" :key="item.index" :label="item.name" :value="item.index"></el-option>
+      </el-select>
+      <el-button style="width: 100%;" type="primary" :disabled="loading" :loading="printing"
+                 @click="printing = true;print()">打印
       </el-button>
     </div>
   </div>
@@ -109,8 +148,16 @@ export default {
   display: flex;
   flex-direction: column;
 
+  .content {
+    flex: auto;
+    display: flex;
+    flex-direction: column;
+  }
+
   .top {
     height: 40px;
+    font-size: 12px;
+    color: rgba(0, 0, 0, 0.5);
   }
 
   iframe {
@@ -122,5 +169,9 @@ export default {
   > div {
     flex: none;
   }
+
+  .el-select {
+    margin-right: 12px;
+  }
 }
 </style>

+ 69 - 25
src/components/print/tag_60_40.vue

@@ -1,14 +1,14 @@
 <script>
 import CLodop from '@/libs/print/CLodop';
-import {getPrint} from '@/api/decoct/recipe';
-import {getDevice} from '@/tools/print.tool';
+import {getDevice, getDevices} from '@/tools/print.tool';
 import {template60_40} from '@/components/print/template';
+import {getPrint} from '@/api/decoct/recipe';
 
 export default {
   name: 'print_tag_60_40',
   props: {
     id: {type: [String, Number], required: true},
-    init: {type: Boolean, default: false},
+    selectable: Boolean,
   },
   data() {
     return {
@@ -18,9 +18,12 @@ export default {
 
       tag: `print-preview_${Date.now()}`,
       paper: '发药标签',
+      paperWidth: 60 * 10,
+      paperHeight: 40 * 10,
 
       model: null,
       device: null,
+      devices: [],
       printing: false,
     };
   },
@@ -28,39 +31,47 @@ export default {
     loading() {
       return !this.loaded || !this.preview;
     },
+    deviceId() {
+      return this.device ? this.device.index : '';
+    }
   },
   mounted() {
-    if (this.$props.init) this.print(true);
+    if (this.selectable) getDevices().then(devices => this.devices = devices);
+    this.loaded = true;
   },
   methods: {
     async print(preview = false) {
+      if (preview) this.loaded = false;
+
       const instance = await CLodop();
       const model = await this.getModel();
-
+      const postfix = model.recipe.usageMethod;
       template60_40.call(instance, model, `${this.paper}`);
 
-      this.device = await getDevice(`paper:${this.paper}`);
-      if (this.device) instance['SET_PRINT_PAGESIZE'](1, 0, 0, this.paper);
-      else {
-        this.device = await getDevice({width: 60, height: 40}, `name:Gprinter GP-1324D`);
-        if (this.device) instance['SET_PRINT_PAGESIZE'](1, '60mm', '40mm', 'CreateCustomPage');
-      }
-      if (this.device) instance['SET_PRINTER_INDEX'](this.device.index);
-
-      instance['SET_PRINT_COPIES'](this.total);
-
-      if (preview) {
-        instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
-        instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
-        instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
-        instance['PREVIEW'](this.tag);
-      } else if (this.device) {
-        if (instance['PRINT']()) this.complete();
-        else this.$message.warning(`请检查打印机 (${this.device.name})`);
+      const device = await this.getDevice(postfix);
+      if (device) {
+        if (device.papers.includes(this.paper)) instance['SET_PRINT_PAGESIZE'](1, 0, 0, this.paper);
+        else instance['SET_PRINT_PAGESIZE'](1, this.paperWidth, this.paperHeight, 'CreateCustomPage');
+
+        instance['SET_PRINTER_INDEX'](device.index);
+        instance['SET_PRINT_COPIES'](this.total);
+
+        if (preview) {
+          instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
+          instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
+          instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
+          instance['PREVIEW'](this.tag);
+        } else {
+          if (instance['PRINT']()) this.complete();
+          else this.$message.warning(`请检查打印机 (${this.device.name})`);
+        }
+      } else if (preview) {
+        this.devices = await getDevices();
       } else {
         if (instance['PRINTA']()) this.complete();
         else this.$message.warning(`请检查打印机`);
       }
+
       this.printing = false;
       this.loaded = true;
     },
@@ -87,6 +98,7 @@ export default {
             count: data['number'],
             total: data['packageNumber'],
             method: data['prescriptionusage'],
+            usageMethod: data['usageMethod'],
             volume: data['packageDose'] ? `${data['packageDose']}ml` : '',
             delivery: data['expressExecutor'],
             decoction: data['isBehalf'] === '1' ? '代煎' : '自煎',
@@ -107,18 +119,43 @@ export default {
         return this.model;
       });
     },
+
+    async getDevice(postfix= '') {
+      if (!this.device) this.device = await getDevice(
+        `name: Six:${this.paper}-${postfix}`,
+        `name: Six:${this.paperWidth}*${this.paperHeight}-${postfix}`,
+        `name: Six:${this.paper}`,
+        `name: Six:${this.paperWidth}*${this.paperHeight}`,
+        `driver: Gprinter GP-1324D; paper: ${this.paper}`,
+        `paper:${this.paper}`,
+        `driver: Gprinter GP-1324D;`,
+      );
+      return this.device;
+    },
+
+    selected(value) {
+      this.device = this.devices.find(device => device.index === value);
+      this.print(true);
+    }
   },
 };
 </script>
 
 <template>
   <div class="print-preview" v-loading="loading">
-    <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}"></div>
-    <iframe :id="tag" @load="delay"></iframe>
+    <div v-loading="loading">
+      <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}">
+        {{ device && device.name }}
+      </div>
+      <iframe :id="tag" @load="delay"></iframe>
+    </div>
     <div style="display: flex; align-items: center; justify-content: space-evenly;">
       <el-tooltip class="item" effect="dark" content="打印数量" placement="top">
         <el-input-number style="width: 120px;" v-model="total" :min="1" :disabled="printing"></el-input-number>
       </el-tooltip>
+      <el-select v-if="devices.length" placeholder="打印机" :value="deviceId" @change="selected">
+        <el-option v-for="item in devices" :key="item.index" :label="item.name" :value="item.index"></el-option>
+      </el-select>
       <el-button type="primary" :loading="printing" @click="printing = true;print()">打印</el-button>
     </div>
   </div>
@@ -131,6 +168,8 @@ export default {
 
   .top {
     height: 40px;
+    font-size: 12px;
+    color: rgba(0, 0, 0, 0.5);
   }
 
   iframe {
@@ -138,5 +177,10 @@ export default {
     width: 100%;
     height: 240px;
   }
+
+  .el-select {
+    margin: 0 12px;
+    flex: 1;
+  }
 }
 </style>

+ 69 - 27
src/components/print/tag_80_50.vue

@@ -1,6 +1,6 @@
 <script>
 import CLodop from '@/libs/print/CLodop';
-import {getDevice} from '@/tools/print.tool';
+import {getDevice, getDevices} from '@/tools/print.tool';
 import {template60_60} from '@/components/print/template';
 import {selectOrderDetail2} from '@/api/prescription/prescriptionAudit';
 
@@ -8,6 +8,7 @@ export default {
   name: 'print_tag_80_50',
   props: {
     id: {type: [String, Number], required: true},
+    selectable: Boolean,
   },
   data() {
     return {
@@ -17,9 +18,12 @@ export default {
 
       tag: `print-preview_${Date.now()}`,
       paper: '包装标签',
+      paperWidth: 60 * 10,
+      paperHeight: 60 * 10,
 
       model: null,
       device: null,
+      devices: [],
       printing: false,
     };
   },
@@ -27,39 +31,47 @@ export default {
     loading() {
       return !this.loaded || !this.preview;
     },
+    deviceId() {
+      return this.device ? this.device.index : '';
+    }
   },
   mounted() {
-    // this.print(true);
+    if (this.selectable) getDevices().then(devices => this.devices = devices);
+    this.loaded = true;
   },
   methods: {
     async print(preview = false) {
+      if (preview) this.loaded = false;
+
       const instance = await CLodop();
       const model = await this.getModel();
-
+      const postfix = model.recipe.usageMethod;
       template60_60.call(instance, model, `${this.paper}`);
 
-      this.device = await getDevice(`paper:${this.paper}`);
-      if (this.device) instance['SET_PRINT_PAGESIZE'](1, 0, 0, this.paper);
-      else {
-        this.device = await getDevice({width: 60, height: 40}, `name:Gprinter GP-1324D`);
-        if (this.device) instance['SET_PRINT_PAGESIZE'](1, '60mm', '40mm', 'CreateCustomPage');
-      }
-      if (this.device) instance['SET_PRINTER_INDEX'](this.device.index);
-
-      instance['SET_PRINT_COPIES'](this.total);
-
-      if (preview) {
-        instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
-        instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
-        instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
-        instance['PREVIEW'](this.tag);
-      } else if (this.device) {
-        if (instance['PRINT']()) this.complete();
-        else this.$message.warning(`请检查打印机 (${this.device.name})`);
+      const device = await this.getDevice(postfix);
+      if (device) {
+        if (device.papers.includes(this.paper)) instance['SET_PRINT_PAGESIZE'](1, 0, 0, this.paper);
+        else instance['SET_PRINT_PAGESIZE'](1, this.paperWidth, this.paperHeight, 'CreateCustomPage');
+
+        instance['SET_PRINTER_INDEX'](device.index);
+        instance['SET_PRINT_COPIES'](this.total);
+
+        if (preview) {
+          instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
+          instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
+          instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
+          instance['PREVIEW'](this.tag);
+        } else {
+          if (instance['PRINT']()) this.complete();
+          else this.$message.warning(`请检查打印机 (${this.device.name})`);
+        }
+      } else if (preview) {
+        this.devices = await getDevices();
       } else {
         if (instance['PRINTA']()) this.complete();
         else this.$message.warning(`请检查打印机`);
       }
+
       this.printing = false;
       this.loaded = true;
     },
@@ -72,20 +84,44 @@ export default {
     },
 
     async getModel() {
-      if (this.model) return this.model;
-      this.model = await selectOrderDetail2({id: this.id});
+      if (!this.model) this.model = await selectOrderDetail2({id: this.id});
       return this.model;
     },
+
+    async getDevice(postfix= '') {
+      if (!this.device) this.device = await getDevice(
+        `name: Six:${this.paper}-${postfix}`,
+        `name: Six:${this.paperWidth}*${this.paperHeight}-${postfix}`,
+        `name: Six:${this.paper}`,
+        `name: Six:${this.paperWidth}*${this.paperHeight}`,
+        `driver: Gprinter GP-1324D; paper: ${this.paper}`,
+        `paper:${this.paper}`,
+        `driver: Gprinter GP-1324D;`,
+      );
+      return this.device;
+    },
+
+    selected(value) {
+      this.device = this.devices.find(device => device.index === value);
+      this.print(true);
+    }
   },
 };
 </script>
 
 <template>
-  <div class="print-preview" v-loading="loading">
-    <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}"></div>
-    <iframe :id="tag" @load="delay"></iframe>
+  <div class="print-preview">
+    <div v-loading="loading">
+      <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}">
+        {{ device && device.name }}
+      </div>
+      <iframe :id="tag" @load="delay"></iframe>
+    </div>
     <div style="display: flex; align-items: center; justify-content: space-evenly;">
-      <el-button style="width: 100%;" type="primary" :loading="printing" @click="printing = true;print()">打印</el-button>
+      <el-select v-if="devices.length" placeholder="打印机" :value="deviceId" @change="selected">
+        <el-option v-for="item in devices" :key="item.index" :label="item.name" :value="item.index"></el-option>
+      </el-select>
+      <el-button style="width: 100%;" type="primary" :disabled="loading" :loading="printing" @click="printing = true;print()">打印</el-button>
     </div>
   </div>
 </template>
@@ -97,6 +133,8 @@ export default {
 
   .top {
     height: 40px;
+    font-size: 12px;
+    color: rgba(0, 0, 0, 0.5);
   }
 
   iframe {
@@ -104,5 +142,9 @@ export default {
     width: 100%;
     height: 280px;
   }
+
+  .el-select {
+    margin-right: 12px;
+  }
 }
 </style>

+ 73 - 25
src/components/print/ticket_72.vue

@@ -1,6 +1,6 @@
 <script>
 import CLodop from '@/libs/print/CLodop';
-import {getDevice} from '@/tools/print.tool';
+import {getDevice, getDevices} from '@/tools/print.tool';
 import {template72} from '@/components/print/template';
 import {selectOrderDetail, selectOrderDetail2} from '@/api/prescription/prescriptionAudit';
 import {bignumber, chain, multiply} from 'mathjs';
@@ -18,9 +18,12 @@ export default {
 
       tag: `print-preview_${Date.now()}`,
       paper: '药品明细',
+      paperWidth: 72 * 10,
+      paperHeight: 0,
 
       model: null,
       device: null,
+      devices: [],
       printing: false,
     };
   },
@@ -28,39 +31,47 @@ export default {
     loading() {
       return !this.loaded || !this.preview;
     },
+    deviceId() {
+      return this.device ? this.device.index : '';
+    }
   },
   mounted() {
-    // this.print(true);
+    if (this.selectable) getDevices().then(devices => this.devices = devices);
+    this.loaded = true;
   },
   methods: {
     async print(preview = false) {
+      if (preview) this.loaded = false;
+
       const instance = await CLodop();
       const model = await this.getModel();
 
       template72.call(instance, model, `${this.paper}`);
 
-      this.device = await getDevice(`paper:${this.paper}`);
-      if (this.device) instance['SET_PRINT_PAGESIZE'](3, 0, 0, this.paper);
-      else {
-        this.device = await getDevice(`name:GP-C80180 Series`);
-        instance['SET_PRINT_PAGESIZE'](3, '72mm', 0, 'CreateCustomPage');
-      }
-      if (this.device) instance['SET_PRINTER_INDEX'](this.device.index);
-
-      instance['SET_PRINT_COPIES'](this.total);
-
-      if (preview) {
-        instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
-        instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
-        instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
-        instance['PREVIEW'](this.tag);
-      } else if (this.device) {
-        if (instance['PRINT']()) this.complete();
-        else this.$message.warning(`请检查打印机 (${this.device.name})`);
+      const device = await this.getDevice();
+      if (device) {
+        if (device.papers.includes(this.paper)) instance['SET_PRINT_PAGESIZE'](3, 0, 0, this.paper);
+        else instance['SET_PRINT_PAGESIZE'](3, this.paperWidth, this.paperHeight, 'CreateCustomPage');
+
+        instance['SET_PRINTER_INDEX'](device.index);
+        instance['SET_PRINT_COPIES'](this.total);
+
+        if (preview) {
+          instance['SET_PREVIEW_WINDOW'](1, 1, 1, 0, 0, `${this.paper}.开始打印`);
+          instance['SET_SHOW_MODE']('PREVIEW_IN_BROWSE', true);
+          instance['SET_PRINT_MODE']('AUTO_CLOSE_PREWINDOW', true);
+          instance['PREVIEW'](this.tag);
+        } else {
+          if (instance['PRINT']()) this.complete();
+          else this.$message.warning(`请检查打印机 (${this.device.name})`);
+        }
+      } else if (preview) {
+        this.devices = await getDevices();
       } else {
         if (instance['PRINTA']()) this.complete();
         else this.$message.warning(`请检查打印机`);
       }
+
       this.printing = false;
       this.loaded = true;
     },
@@ -86,16 +97,41 @@ export default {
 
       return this.model;
     },
+
+    async getDevice() {
+      if (!this.device) this.device = await getDevice(
+        `name: Six:${this.paper}`,
+        `name: Six:${this.paperWidth}`,
+        `name: Six:ticket`,
+        `driver: GP-C80180 Series; paper: ${this.paper}`,
+        `driver: GP-C80180 Series;`,
+        `paper:${this.paper}`,
+      );
+      return this.device;
+    },
+
+    selected(value) {
+      this.device = this.devices.find(device => device.index === value);
+      this.print(true);
+    }
   },
 };
 </script>
 
 <template>
-  <div class="print-preview" v-loading="loading">
-    <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}"></div>
-    <iframe :id="tag" @load="delay"></iframe>
+  <div class="print-preview">
+    <div class="content" v-loading="loading">
+      <div class="top" :style="{backgroundColor: preview ? '#f0f0f0' : 'transparent'}">
+        {{ device && device.name }}
+      </div>
+      <iframe :id="tag" @load="delay"></iframe>
+    </div>
     <div style="display: flex; align-items: center; justify-content: space-evenly;">
-      <el-button style="width: 100%;" type="primary" :loading="printing" @click="printing = true;print()">打印
+      <el-select v-if="devices.length" placeholder="打印机" :value="deviceId" @change="selected">
+        <el-option v-for="item in devices" :key="item.index" :label="item.name" :value="item.index"></el-option>
+      </el-select>
+      <el-button style="width: 100%;" type="primary" :disabled="loading" :loading="printing"
+                 @click="printing = true;print()">打印
       </el-button>
     </div>
   </div>
@@ -104,12 +140,20 @@ export default {
 <style scoped lang="scss">
 .print-preview {
   margin: auto;
-  width: 360px;
+  width: 559px + 100px;
   display: flex;
   flex-direction: column;
 
+  .content {
+    flex: auto;
+    display: flex;
+    flex-direction: column;
+  }
+
   .top {
     height: 40px;
+    font-size: 12px;
+    color: rgba(0, 0, 0, 0.5);
   }
 
   iframe {
@@ -121,5 +165,9 @@ export default {
   > div {
     flex: none;
   }
+
+  .el-select {
+    margin-right: 12px;
+  }
 }
 </style>

+ 12 - 2
src/components/selectTable/selectOutTable.vue

@@ -8,6 +8,7 @@
     remote
     reserve-keyword
     placeholder="药品名称"
+    :disabled="disableDetails"
     :remote-method="remoteMethod"
     :loading="loading">
     <el-option disabled value="-1">
@@ -250,8 +251,17 @@ export default {
 	}
 }
 </script>
-
+<style lang="scss" scoped>
+.select-table {
+  width: 100%;
+  td {
+    &:first-of-type {
+      width: 250px;
+    }
+  }
+}
+</style>
 <style scoped>
 .el-table >>> tr.row-disabled { cursor: not-allowed; color: #999; background: #eee; }
 .select-table-head { background-color: #17C7B1; color: #fff; }
-</style>
+</style>

+ 11 - 3
src/components/selectTable/selectTable.vue

@@ -6,7 +6,7 @@
     remote
     size="mini"
     reserve-keyword
-    :disabled="disabled"
+    :disabled="disabled || disableDetails"
     placeholder="药品名称"
     :remote-method="remoteMethod"
     :loading="loading">
@@ -152,6 +152,14 @@ export default {
 }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
+.select-table {
+  width: 100%;
+  td {
+    &:first-of-type {
+      width: 250px;
+    }
+  }
+}
 .select-table-head { background-color: #17C7B1; color: #fff; }
-</style>
+</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
src/libs/print/SCPPrint-2.7.1.js


+ 4 - 0
src/main.js

@@ -45,6 +45,10 @@ Vue.prototype.resetForm = resetForm
 Vue.prototype.addDateRange = addDateRange
 Vue.prototype.selectDictLabel = selectDictLabel
 Vue.prototype.selectDictLabels = selectDictLabels
+/**
+ * @deprecated
+ * @type {download}
+ */
 Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
 

+ 35 - 18
src/tools/print.tool.js

@@ -35,7 +35,7 @@ import {withResolvers} from '@/tools/object';
  * @returns {Promise<sf_express_instance>}
  */
 let sf_express = async function (options = {}) {
-  const module = await import('@/libs/print/SCPPrint-2.7.js');
+  const module = await import('@/libs/print/SCPPrint-2.7.1.js');
 
   const {promise: load, resolve, reject} = withResolvers();
 
@@ -52,6 +52,7 @@ let sf_express = async function (options = {}) {
   try {
     const instance = await load;
     sf_express = () => Promise.resolve(instance);
+    return instance;
   } catch (e) {}
   return instance;
 };
@@ -60,23 +61,31 @@ let sf_express = async function (options = {}) {
  *
  * @type {sf_express_instance_print_function}
  */
-export async function sf_express_print(data, options = {}) {
+export async function sf_express_print(data, options = {}, device) {
   const instance = await sf_express(options);
-  const {promise: loadDevices, resolve, reject} = withResolvers();
 
-  instance['getPrinters']((result) => {
-    if (result.code === 1) {
-      const devices = Array.isArray(result.printers) ? result.printers : [];
-      resolve(devices);
-    } else reject({message: result.msg, code: result.code});
-  });
+  if (device == null) {
+    const {promise: loadDevices, resolve, reject} = withResolvers();
+
+    instance['getPrinters']((result) => {
+      if (result.code === 1) {
+        const devices = Array.isArray(result.printers) ? result.printers : [];
+        resolve(devices);
+      } else reject({message: result.msg, code: result.code});
+    });
 
-  const devices = await loadDevices;
+    const devices = await loadDevices;
 
-  const device = devices.find(device => device.name.startsWith(process.env.VUE_APP_SF_EXPRESS_APPNAME));
+    device = devices.find(device => device.name.startsWith(process.env.VUE_APP_SF_EXPRESS_APPNAME));
+  }
 
   if (device) instance['setPrinter'](device.index);
-  await instance.print(data);
+  return new Promise((resolve, reject) => {
+    instance.print(data, ({code, msg}) => {
+      if (code === 1) resolve()
+      else reject({code, message: msg});
+    });
+  });
 }
 
 let c_lodop = async function (options = {}) {
@@ -92,7 +101,8 @@ export async function getDevices() {
   const LODOP = await c_lodop();
   return Array.from({length: LODOP['GET_PRINTER_COUNT']()}, (_, i) => {
     return {
-      name: LODOP['GET_PRINTER_NAME'](`${i}:DriverName`),
+      name: LODOP['GET_PRINTER_NAME'](`${i}`),
+      driver: LODOP['GET_PRINTER_NAME'](`${i}:DriverName`),
       index: i,
       papers: LODOP['GET_PAGESIZES_LIST'](i, '\n').split('\n'),
       size: +LODOP['GET_PRINTER_NAME'](`${i}:PaperSize`),
@@ -108,14 +118,21 @@ export async function getDevice(...priority) {
   const devices = await getDevices();
   let device;
   for (let item of priority) {
+    let command = [];
     if (typeof item === 'string') {
-      const [key, value] = item.split(':');
-      item = {[key]: value};
+      const regex = /([^:;]+):+([^;]*)/g;
+      let match;
+      while ((match = regex.exec(item))) {
+        const key = match[1].trim();
+        const value = match[2].trim();
+        if (key && value) command.push([key, value]);
+      }
+    } else {
+      command = Object.entries(item);
     }
-    device = devices.find(device => Object.entries(item).every(([key, value]) => {
+    device = devices.find(device => command.every(([key, value]) => {
       if (key === 'paper') return device['papers'].includes(value);
-      if (key === 'name') return device.name.startsWith(value);
-      if (key === 'width' || key === 'height') value *= 10; /* 传入 mm,比较的是 0.1mm */
+      if (key === 'width_mm' || key === 'height_mm') value *= 10; /* 传入 mm,比较的是 0.1mm */
       return device[key] === value;
     }));
     if (device) break;

+ 17 - 5
src/utils/request.js

@@ -3,6 +3,7 @@ import { Notification, MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
 import errorCode from '@/utils/errorCode'
+import { downloadBlob } from '@/utils/zipdownload';
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
@@ -52,12 +53,23 @@ service.interceptors.request.use(config => {
 })
 
 // 响应拦截器
-service.interceptors.response.use(res => {
-    if (res.config.fileType && res.data instanceof Blob) {
+service.interceptors.response.use(async res => {
+    if (res.data instanceof Blob) {
       const value = res.headers['Content-Disposition'] || res.headers['content-disposition'] || '';
-      return {
-        name: (value.match(/fileName=["']([^"']+)["']/) || [])[1],
-        blob: new Blob([res.data], { type: res.config.fileType }),
+      const type = res.headers['Content-Type'] || res.headers['content-type'] || res.config.fileType;
+      if (type === 'application/json') {
+        const text = await res.data.text()
+        res.data = JSON.parse(text);
+      } else if(res.config.download) {
+        return downloadBlob({
+          name: decodeURIComponent((value.match(/fileName=["']([^"']+)["']/i) || [])[1] || '') || (typeof res.config.download === 'string' ? res.config.download : ''),
+          blob: res.data
+        });
+      } else {
+        return {
+          name: decodeURIComponent((value.match(/fileName=["']([^"']+)["']/i) || [])[1] || ''),
+          blob: new Blob([res.data], { type }),
+        }
       }
     } else if (res.config.forced) {
       return res;

+ 4 - 1
src/utils/ruoyi.js

@@ -95,7 +95,10 @@ export function selectDictLabels(datas, value, separator) {
 	return actions.join('').substring(0, actions.join('').length - 1);
 }
 
-// 通用下载方法
+/**
+ * 通用下载方法
+ * @deprecated
+ */
 export function download(fileName) {
 	window.location.href = baseURL + "common/download?fileName=" + encodeURI(fileName) + "&delete=" + true;
 }

+ 18 - 0
src/utils/zipdownload.js

@@ -40,3 +40,21 @@ export function resolveBlob(res, mimeType) {
   URL.revokeObjectURL(aLink.href);//清除引用
   document.body.removeChild(aLink);
 }
+
+export function downloadBlob({blob, name}) {
+  const link = document.createElement('a');
+  document.body.appendChild(link);
+
+  const url = URL.createObjectURL(blob);
+  link.href = url;
+  link.download = name;
+  link.click();
+
+  return new Promise(resolve => {
+    setTimeout(() => {
+      document.body.removeChild(link);
+      URL.revokeObjectURL(url);
+      resolve({blob, name});
+    }, 20)
+  })
+}

+ 214 - 0
src/views/decoct/bucket.vue

@@ -0,0 +1,214 @@
+<script>
+import dayjs from 'dayjs';
+import {exportDecoctBucket, listDecoctBucket} from '@/api/decoct';
+import {listMedicalMechanism} from '@/api/medical/mechanism';
+
+/**
+ * 绑桶记录
+ */
+export default {
+  name: 'DecoctBucket',
+  components: {},
+  data() {
+    return {
+      deployStateArr: [
+        {name: '已审核', id: 110, key: 'audited'},
+        // { name: "已审核不通过", id: 120, key: "---" },
+        {name: '已调配', id: 130, key: 'allocated'},
+        {name: '已复核', id: 140, key: 'reviewed'},
+        {name: '已浸泡', id: 150, key: 'soaked'},
+        {name: '已煎煮', id: 160, key: 'cooked'},
+        {name: '已先煎', id: 161, key: 'preCooked'},
+        {name: '已开始煎煮', id: 162, key: 'startedCooking'},
+        {name: '已后下', id: 163, key: 'lowered'},
+        {name: '已结束煎煮', id: 164, key: 'finishedCooking'},
+        {name: '已开始浓缩', id: 165, key: 'startedConcentration'},
+        {name: '已结束浓缩', id: 166, key: 'finishedConcentration'},
+        {name: '已打包', id: 170, key: 'packaged'},
+        {name: '已上架', id: 171, key: 'grounding'},
+        {name: '已发药', id: 175, key: 'send'},
+        // { name: "煎药已作废", id: 999, key: "---" },
+      ],
+      listMedicalMechanismArr: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+
+        date: [],
+        yljgId: void 0,
+        name: void 0,
+        preNo: void 0,
+        orderNo: void 0,
+        thread: void 0,
+        deviceCode: void 0,
+      },
+      exporting: false,
+      loading: false,
+      dataset: [],
+      total: 0,
+
+      // 选择的
+      selected: [],
+    };
+  },
+  created() {
+    this.resetQuery();
+    listMedicalMechanism().then((res) => {this.listMedicalMechanismArr = res.data;});
+  },
+  methods: {
+    getQueryParams() {
+      const {date, ...params} = this.queryParams;
+      if (date && date.length) {
+        params.startTime = date[0];
+        params.endTime = date[1];
+      } else {
+        params.startTime = '';
+        params.endTime = '';
+      }
+      return params;
+    },
+    async getList() {
+      this.loading = true;
+      try {
+        const res = await listDecoctBucket(this.getQueryParams());
+        this.dataset = res.rows;
+        this.total = res.total;
+      } catch (e) {}
+      this.loading = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm');
+      const now = dayjs().format('YYYY-MM-DD');
+      this.queryParams.date = [now, now];
+      this.handleQuery();
+    },
+    async handleExport() {
+      this.exporting = true;
+      try {
+        const data = await exportDecoctBucket(this.getQueryParams());
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (error) {}
+      this.exporting = false;
+    },
+
+    handleSelectionChange(selection) {
+      this.selected = [...selection];
+    },
+  },
+};
+</script>
+
+<template>
+  <div class="app-container">
+    <el-row :gutter="24">
+      <el-col :span="24" :xs="24">
+        <el-form ref="queryForm" label-width="68px" :inline="true" :model="queryParams">
+          <div class="query-box">
+            <div class="query-box__left">
+              <el-form-item label="" prop="date">
+                <el-date-picker v-model="queryParams.date" size="mini"
+                                type="daterange" value-format="yyyy-MM-dd"
+                                range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+                />
+              </el-form-item>
+              <el-form-item label="" prop="yljgId">
+                <el-select v-model="queryParams.yljgId" placeholder="医疗机构" filterable clearable>
+                  <el-option v-for="item in listMedicalMechanismArr" :key="item.id"
+                             :label="item.name" :value="item.id" :disabled="item.state !== '1'"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="" prop="thread">
+                <el-select v-model="queryParams.thread" placeholder="流程状态" clearable>
+                  <el-option v-for="item in deployStateArr" :key="item.id"
+                             :label="item.name" :value="item.id.toString()"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="" prop="deviceCode">
+                <el-input style="width: 240px" placeholder="桶编号" clearable size="small"
+                          v-model="queryParams.deviceCode" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+              <el-form-item label="" prop="name">
+                <el-input style="width: 240px" placeholder="患者姓名" clearable size="small"
+                          v-model="queryParams.name" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+              <el-form-item label="" prop="preNo">
+                <el-input style="width: 240px" placeholder="处方号" clearable size="small"
+                          v-model="queryParams.preNo" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+              <el-form-item label="" prop="orderNo">
+                <el-input style="width: 240px" placeholder="订单号" clearable size="small"
+                          v-model="queryParams.orderNo" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+                <el-button type="primary" size="mini" @click="handleExport()">导出</el-button>
+                <!--                v-hasPermi="['decoct:bucket:export']"-->
+              </el-form-item>
+            </div>
+          </div>
+        </el-form>
+
+        <el-table v-loading="loading" :data="dataset" @selection-change="handleSelectionChange" border>
+          <!--<el-table-column type="selection" width="50" align="center"/>-->
+          <el-table-column type="index" label="序号" align="center" width="55"/>
+          <el-table-column prop="hospitalName" label="医疗机构" min-width="180" align="center"></el-table-column>
+          <el-table-column prop="orderNo" label="订单号" align="center"></el-table-column>
+          <el-table-column prop="preNo" label="处方号" align="center"></el-table-column>
+          <el-table-column prop="name" label="患者" align="center"></el-table-column>
+          <el-table-column label="流程状态" prop="thread" align="center">
+            <template slot-scope="scope">
+              {{ (deployStateArr.find(option => option.id.toString() === scope.row.thread) || {}).name || scope.row.thread }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="operatingTime" label="操作时间" align="center"
+                           :show-overflow-tooltip="true"></el-table-column>
+          <el-table-column prop="operator" label="操作人" align="center"></el-table-column>
+
+          <el-table-column label="桶编号" prop="deviceCode" align="center"/>
+          <el-table-column label="煎药区" prop="areaName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="待行区" prop="waitingName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="加水量(ml)" prop="soakingWaterValue" align="center" :show-overflow-tooltip="true"/>
+        </el-table>
+
+        <pagination v-show="total > 0" :total="total"
+                    :page.sync="queryParams.pageNum"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"/>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.edit-dialog-wrapper {
+  ::v-deep {
+    .el-select {
+      width: 100%;
+    }
+
+    .el-input-group {
+      border-top-left-radius: 8px;
+      border-bottom-left-radius: 8px;
+
+      .el-input__inner {
+        border-radius: inherit;
+      }
+
+      .el-input-group__append {
+        border-top-right-radius: 8px;
+        border-bottom-right-radius: 8px;
+      }
+    }
+  }
+}
+</style>

+ 15 - 2
src/views/decoct/device/components/edit.vue

@@ -9,7 +9,7 @@
           <el-option :label="item.dictLabel" :value="item.dictValue" v-for="item in typeOptions" :key="item.dictCode"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="设备编号:">
+      <el-form-item label="设备编号:" required>
         <el-input v-model="formInline.deviceCode" placeholder="设备编号"></el-input>
       </el-form-item>
       <el-form-item label="机组编号:">
@@ -18,6 +18,13 @@
       <el-form-item label="设备地址:">
         <el-input v-model="formInline.deviceIp" placeholder="设备地址"></el-input>
       </el-form-item>
+      <el-form-item label="关联煎药区" prop="decoctionAreaCode">
+        <el-select v-model="formInline.decoctionAreaCode" placeholder="请选择备用煎药区" filterable>
+          <el-option v-for="item in stationOptions" :key="item.id"
+                     :label="item.areaName" :value="item.areaCode" :disabled="item.state !== 0"
+          />
+        </el-select>
+      </el-form-item>
       <el-form-item label="启用状态:" required>
         <el-radio-group v-model="formInline.status">
           <el-radio :label="0">开启</el-radio>
@@ -30,6 +37,7 @@
 
 <script>
 import { getDeviceDetail, addDevice, updateDevice } from "@/api/decoct/device";
+import { getDecoctStationOptions } from '@/api/decoct';
 export default {
   props: {
     disabled: {
@@ -41,6 +49,7 @@ export default {
   data() {
     return {
       formInline: {
+        decoctionAreaCode: void 0,
         deviceName: '',
         deviceType: '',
         deviceCode: '',
@@ -49,6 +58,8 @@ export default {
         status: 0,
       },
       loading: false,
+      // 煎药区
+      stationOptions: [],
       typeOptions: []
     }
   },
@@ -56,6 +67,7 @@ export default {
     this.getDicts("device_type").then((response) => {
       this.typeOptions = response.data;
     });
+    getDecoctStationOptions().then((response) => {this.stationOptions = response.data;}, () => []);
   },
   methods: {
     openDialog() {
@@ -80,6 +92,7 @@ export default {
     // 修改
     toUpdate() {
       this.loading = true;
+      this.formInline.decoctionAreaName = this.formInline.decoctionAreaCode == null ? '' : (this.stationOptions.find(option => option.areaCode === this.formInline.decoctionAreaCode) || {}).areaName || '';
       updateDevice(this.formInline).then((response) => {
         this.msgSuccess('修改成功')
         this.$emit('success')
@@ -90,6 +103,7 @@ export default {
     // 新增
     toAdd() {
       this.loading = true;
+      this.formInline.decoctionAreaName = this.formInline.decoctionAreaCode == null ? '' : (this.stationOptions.find(option => option.areaCode === this.formInline.decoctionAreaCode) || {}).areaName || '';
       addDevice(this.formInline).then((response) => {
         this.msgSuccess('新增成功')
         this.$emit('success')
@@ -103,7 +117,6 @@ export default {
 
 <style lang="scss" scoped>
 .edit-dialog {
-  height: 400px;
   overflow: auto;
   &-formInline{
     width: 330px;

+ 312 - 0
src/views/decoct/route.vue

@@ -0,0 +1,312 @@
+<script>
+import {deleteDecoctRoute, editDecoctRoute, listDecoctRoute} from '@/api/decoct';
+
+/**
+ * 待行区管理
+ */
+export default {
+  name: 'DecoctRoute',
+  components: {},
+  data() {
+    return {
+      lineGroupOptions: [],
+      stateOptions: [
+        {label: '启用', value: 0},
+        {label: '停用', value: 1},
+      ],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        areaName: void 0,
+        areaCode: void 0,
+        state: void 0,
+      },
+      loading: false,
+      dataset: [],
+      total: 0,
+      // 编辑参数
+      editTitle: '',
+      editOpen: false,
+      editModel: {
+        areaName: void 0,
+        areaCode: void 0,
+        remark: '',
+        state: 0,
+        lineGroup: void 0,
+      },
+      editRules: {
+        areaName: [{required: true, message: '待行区名称不能为空', trigger: 'blur'}],
+        areaCode: [{required: true, message: '待行区编号不能为空', trigger: 'blur'}],
+      },
+      editError: '',
+      submitting: false,
+
+      // 选择的
+      selected: [],
+    };
+  },
+  created() {
+    this.handleQuery();
+  },
+  methods: {
+    async getList() {
+      this.loading = true;
+      try {
+        const res = await listDecoctRoute(this.queryParams);
+        this.dataset = res.rows.map((row) => Object.assign(row, {
+          createTime: (row.createTime || '').replace('T', ' '),
+          updateTime: (row.updateTime || '').replace('T', ' '),
+        }));
+        this.total = res.total;
+      } catch (e) {}
+      this.loading = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm');
+      this.handleQuery();
+    },
+    async handleDelete(model) {
+      try {
+        await deleteDecoctRoute(model);
+        await this.getList();
+        this.$message.success('删除成功');
+      } catch (e) { }
+    },
+    async handleEdit(model) {
+      this.editModel = Object.assign({
+        areaName: void 0,
+        areaCode: void 0,
+        remark: '',
+        state: 0,
+        lineGroup: void 0,
+      }, model);
+      if (this.editModel.lineGroup != null) this.editModel.lineGroup = this.editModel.lineGroup.toString();
+      if (this.lineGroupOptions.length === 0) {
+        const loading = this.$loading({
+          lock: true,
+          text: '加载中...',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)',
+        });
+        await this.getDicts('line_group').then((response) => {this.lineGroupOptions = response.data;}, () => []);
+        loading.close();
+      }
+      this.editTitle = (this.editModel.id ? `编辑` : `新增`) + '待行区';
+      this.editOpen = true;
+      this.editError = '';
+      this.$nextTick(() => {
+        this.$refs['editForm'].clearValidate();
+      });
+    },
+    async handleEditSubmit() {
+      this.editError = '';
+      const valid = await this.$refs['editForm'].validate().then(() => true, (err) => {
+        this.$message.warning({showClose: true, message: `请补充完整表单`});
+        return false;
+      });
+      if (!valid) return;
+
+      this.submitting = true;
+      try {
+        await editDecoctRoute(this.editModel);
+        this.$message.success('保存成功');
+        this.editOpen = false;
+        await this.getList();
+      } catch (e) {
+        this.editError = e.message;
+      }
+      this.submitting = false;
+    },
+    async handleUpdate(data, rows = []) {
+      if (rows.length === 0) rows = this.selected;
+      if (rows.length === 0) return;
+
+      const confirm = await this.$confirm(`是否修改 ${rows.length} 项待行区数据的状态?`, '提示', {
+        confirmButtonText: data.state === 0 ? '启用' : '停用',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => true, () => false);
+      if (!confirm) return;
+
+      const loading = this.$loading({
+        lock: true,
+        text: '更新中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      try {
+        await Promise.all(rows.map((row) => editDecoctRoute({...row, ...data})));
+        this.$message.success('更新状态成功');
+      } catch (e) {}
+      await this.getList();
+      loading.close();
+    },
+
+    handleSelectionChange(selection) {
+      this.selected = [...selection];
+    },
+  },
+};
+</script>
+
+<template>
+  <div class="app-container">
+    <el-row :gutter="24">
+      <el-col :span="24" :xs="24">
+        <el-form ref="queryForm" label-width="68px" :inline="true" :model="queryParams">
+          <div class="query-box">
+            <div class="query-box__left">
+              <el-form-item label="" prop="areaName">
+                <el-input style="width: 240px" placeholder="待行区名称" clearable size="small"
+                          v-model="queryParams.areaName" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+              <el-form-item label="" prop="areaCode">
+                <el-input style="width: 240px" placeholder="待行区编号" clearable size="small"
+                          v-model="queryParams.areaCode" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+
+              <el-form-item label="" prop="state">
+                <el-select v-model="queryParams.state" placeholder="状态" filterable clearable>
+                  <el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"/>
+                </el-select>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+              </el-form-item>
+            </div>
+          </div>
+        </el-form>
+
+        <div style="display: flex; justify-content: space-between; margin-bottom: 12px; clear: both;">
+          <div>
+            <el-button type="primary" plain icon="el-icon-plus" size="mini"
+                       @click="handleEdit()"
+                       v-hasPermi="['decoct:route:add']"
+            >新增
+            </el-button>
+          </div>
+          <div>
+            <el-button size="mini" :disabled="selected.length === 0" v-has-permi="['decoct:route:edit']"
+                       @click="handleUpdate({ state: 0 })">启用
+            </el-button>
+            <el-button size="mini" :disabled="selected.length === 0" v-has-permi="['decoct:route:edit']"
+                       @click="handleUpdate({ state: 1 })">停用
+            </el-button>
+          </div>
+        </div>
+
+        <el-table v-loading="loading" :data="dataset" @selection-change="handleSelectionChange" border>
+          <el-table-column type="selection" width="50" align="center"/>
+          <el-table-column type="index" label="序号" align="center" width="55"/>
+          <el-table-column label="待行区名称" prop="areaName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="待行区编号" prop="areaCode" align="center"/>
+          <el-table-column label="状态" prop="state" align="center">
+            <template slot-scope="scope">
+              {{ (stateOptions.find(option => option.value === scope.row.state) || {}).label }}
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" prop="remark" align="center" :show-overflow-tooltip="true"/>
+          <!--<el-table-column label="创建时间" prop="createTime" align="center" :show-overflow-tooltip="true"/>-->
+          <!--<el-table-column label="更新时间" prop="createTime" align="center" :show-overflow-tooltip="true"/>-->
+          <el-table-column
+            label="操作"
+            align="center"
+            width="160"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="scope">
+              <el-button type="primary" style="width: 40px" size="mini"
+                         @click="handleEdit(scope.row)"
+                         v-hasPermi="['decoct:route:edit']"
+              >修改
+              </el-button>
+              <el-popconfirm style="margin-left: 10px;" v-hasPermi="['decoct:route:remove']" title="确定删除吗?"
+                             confirm-button-text="删除" confirm-button-type="danger" @confirm="handleDelete(scope.row)"
+              >
+                <template #reference>
+                  <el-button style="width: 40px" size="mini">删除</el-button>
+                </template>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination v-show="total > 0" :total="total"
+                    :page.sync="queryParams.pageNum"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"/>
+      </el-col>
+    </el-row>
+
+    <el-dialog class="edit-dialog-wrapper" :title="editTitle" :visible.sync="editOpen" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editModel" :rules="editRules" label-width="100px" @submit="handleEditSubmit()">
+        <el-form-item label="待行区名称" prop="areaName">
+          <el-input v-model="editModel.areaName" placeholder="请输入待行区名称" maxlength="30"/>
+        </el-form-item>
+        <el-form-item label="待行区编号" prop="areaCode">
+          <el-input v-model="editModel.areaCode" placeholder="请输入待行区编号" maxlength="30"/>
+        </el-form-item>
+        <el-form-item label="线组" prop="lineGroup">
+          <el-select v-model="editModel.lineGroup" placeholder="请选择线组" clearable>
+            <el-option v-for="item in lineGroupOptions" :key="item.dictCode"
+                       :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}"
+                    v-model="editModel.remark" placeholder="请输入备注">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="状态" prop="lineGroup">
+          <el-select v-model="editModel.state" placeholder="请选择状态">
+            <el-option v-for="item in stateOptions" :key="item.value"
+                       :label="item.label" :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <div style="display: flex;justify-content: space-between;align-items: center;">
+          <div style="color: #ff4949;">{{ editError }}</div>
+          <div>
+            <el-button type="primary" :loading="submitting" @click="handleEditSubmit()">保 存</el-button>
+            <el-button :disabled="submitting" @click="editOpen = false;">取 消</el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.edit-dialog-wrapper {
+  ::v-deep {
+    .el-select {
+      width: 100%;
+    }
+
+    .el-input-group {
+      border-top-left-radius: 8px;
+      border-bottom-left-radius: 8px;
+
+      .el-input__inner {
+        border-radius: inherit;
+      }
+
+      .el-input-group__append {
+        border-top-right-radius: 8px;
+        border-bottom-right-radius: 8px;
+      }
+    }
+  }
+}
+</style>

+ 481 - 0
src/views/decoct/station.vue

@@ -0,0 +1,481 @@
+<script>
+import {
+  deleteDecoctStation,
+  editDecoctStation, getDecoctOperatorList,
+  getDecoctRouteOptions,
+  getDecoctStationOptions,
+  listDecoctStation,
+} from '@/api/decoct';
+import {listMedicalMechanism} from '@/api/medical/mechanism';
+
+/**
+ * 煎药区管理
+ */
+export default {
+  name: 'DecoctStation',
+  components: {},
+  data() {
+    return {
+      // 煎煮人
+      decoctionOptions: [],
+      // 待行区
+      routeOptions: [],
+      // 煎药区
+      stationOptions: [],
+      // 备用煎药区
+      stationOptionsForEdit: [],
+      stateOptions: [
+        {label: '启用', value: 0},
+        {label: '停用', value: 1},
+      ],
+      toxicOptions: [
+        {dictLabel: '毒性', dictValue: 1, dictCode: 1, status: '0'},
+        {dictLabel: '无毒', dictValue: 2, dictCode: 2, status: '0'},
+      ],
+      typeOptions: [
+        {dictLabel: '普通煎药区', dictValue: 1, dictCode: 1, status: '0'},
+        {dictLabel: '智能煎药区', dictValue: 2, dictCode: 2, status: '0'},
+      ],
+      usageMethodOptions: [],
+      listMedicalMechanismArr: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+
+        hospitalCode: void 0,
+        areaName: void 0,
+        areaCode: void 0,
+        areaType: void 0,
+        toxicPieces: void 0,
+        prescriptionUsageCode: void 0,
+        state: void 0,
+      },
+      loading: false,
+      dataset: [],
+      total: 0,
+      // 编辑参数
+      editTitle: '',
+      editOpen: false,
+      editModel: {
+        areaName: void 0,
+        areaCode: void 0,
+        areaType: void 0,
+        toxicPieces: void 0,
+        prescriptionUsageCode: void 0,
+        hospitalCode: void 0,
+        selfPackage: void 0,
+        reserveAreaCode: void 0,
+        waitingCode: void 0,
+        decoctionManagerId: void 0,
+        coefficient: void 0,
+
+        packagingSpecifications: [],
+
+        state: 0,
+      },
+      editRules: {
+        areaName: [{required: true, message: '煎药区名称不能为空', trigger: 'blur'}],
+        areaCode: [{required: true, message: '煎药区编号不能为空', trigger: 'blur'}],
+        areaType: [{required: true, message: '类型不能为空', trigger: 'blur'}],
+        waitingCode: [{required: true, message: '对应待行区不能为空', trigger: 'blur'}],
+      },
+      editError: '',
+      submitting: false,
+
+      // 选择的
+      selected: [],
+    };
+  },
+  created() {
+    this.handleQuery();
+    this.getDicts('usage_method').then((response) => {this.usageMethodOptions = response.data;});
+    listMedicalMechanism().then((res) => {this.listMedicalMechanismArr = res.data;});
+  },
+  methods: {
+    async getList() {
+      this.loading = true;
+      try {
+        const res = await listDecoctStation(this.queryParams);
+        this.dataset = res.rows.map((row) => Object.assign(row, {
+          createTime: (row.createTime || '').replace('T', ' '),
+          updateTime: (row.updateTime || '').replace('T', ' '),
+        }));
+        this.total = res.total;
+      } catch (e) {}
+      this.loading = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm');
+      this.handleQuery();
+    },
+    async handleDelete(model) {
+      try {
+        await deleteDecoctStation(model);
+        await this.getList();
+        this.$message.success('删除成功');
+      } catch (e) { }
+    },
+    async handleEdit(model) {
+      this.editModel = Object.assign({
+        areaName: void 0,
+        areaCode: void 0,
+        state: 0,
+        packagingSpecifications: [],
+      }, model);
+
+      if (typeof this.editModel.packagingSpecifications === 'string') this.editModel.packagingSpecifications = this.editModel.packagingSpecifications.split(',').filter(v => v != null && v !== '');
+      if (this.editModel.toxicPieces === 0) delete this.editModel.toxicPieces;
+      if (this.editModel.prescriptionUsageCode != null) this.editModel.prescriptionUsageCode = this.editModel.prescriptionUsageCode.toString();
+      if (this.editModel.selfPackage != null) this.editModel.selfPackage = this.editModel.selfPackage.toString();
+      if (this.editModel.selfPackage === '0') /* fuck 默认值 */ delete this.editModel.selfPackage;
+      if (typeof this.editModel.decoctionManagerId === 'string') this.editModel.decoctionManagerId = this.editModel.decoctionManagerId ? +this.editModel.decoctionManagerId : void 0;
+
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      if (this.decoctionOptions.length === 0) await getDecoctOperatorList().then((response) => {this.decoctionOptions = response.data;}, () => []);
+      if (this.routeOptions.length === 0) await getDecoctRouteOptions().then((response) => {this.routeOptions = response.data;}, () => []);
+      if (this.stationOptions.length === 0) await getDecoctStationOptions().then((response) => {this.stationOptions = response.data;}, () => []);
+      if (this.editModel.id) this.stationOptionsForEdit = this.editModel.id ? this.stationOptions.filter(option => option.id !== this.editModel.id) : this.stationOptions;
+      loading.close();
+      this.editTitle = (this.editModel.id ? `编辑` : `新增`) + '煎药区';
+      this.editOpen = true;
+      this.editError = '';
+      this.$nextTick(() => {
+        this.$refs['editForm'].clearValidate();
+      });
+    },
+    async handleEditSubmit() {
+      this.editError = '';
+      const valid = await this.$refs['editForm'].validate().then(() => true, (err) => {
+        this.$message.warning({showClose: true, message: `请补充完整表单`});
+        return false;
+      });
+      if (!valid) return;
+
+      this.submitting = true;
+      try {
+        const {packagingSpecifications, ...model} = this.editModel;
+        if (Array.isArray(packagingSpecifications)) model.packagingSpecifications = packagingSpecifications.join(',');
+
+        model.prescriptionUsageName = model.prescriptionUsageCode == null ? '' : (this.usageMethodOptions.find(option => option.dictValue === model.prescriptionUsageCode) || {}).dictLabel || '';
+        model.hospitalName = model.hospitalCode == null ? '' : (this.listMedicalMechanismArr.find(option => option.code === model.hospitalCode) || {}).name || '';
+        model.reserveAreaName = model.reserveAreaCode == null ? '' : (this.stationOptions.find(option => option.areaCode === model.reserveAreaCode) || {}).areaName || '';
+        model.waitingName = model.waitingCode == null ? '' : (this.routeOptions.find(option => option.areaCode === model.waitingCode) || {}).areaName || '';
+        model.decoctionManagerName = model.decoctionManagerId == null ? '' : (this.decoctionOptions.find(option => option.userId === model.decoctionManagerId) || {}).nickName || '';
+
+        await editDecoctStation(model);
+        this.$message.success('保存成功');
+        this.editOpen = false;
+        await this.getList();
+      } catch (e) {
+        this.editError = e.message;
+      }
+      this.submitting = false;
+      this.stationOptions = [];
+    },
+    async handleUpdate(data, rows = []) {
+      if (rows.length === 0) rows = this.selected;
+      if (rows.length === 0) return;
+
+      const confirm = await this.$confirm(`是否修改 ${rows.length} 项煎药区数据的状态?`, '提示', {
+        confirmButtonText: data.state === 0 ? '启用' : '停用',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => true, () => false);
+      if (!confirm) return;
+
+      const loading = this.$loading({
+        lock: true,
+        text: '更新中...',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+      });
+      try {
+        await Promise.all(rows.map((row) => editDecoctStation({...row, ...data})));
+        this.$message.success('更新状态成功');
+      } catch (e) {}
+      await this.getList();
+      loading.close();
+      this.stationOptions = [];
+    },
+
+    handleSelectionChange(selection) {
+      this.selected = [...selection];
+    },
+  },
+};
+</script>
+
+<template>
+  <div class="app-container">
+    <el-row :gutter="24">
+      <el-col :span="24" :xs="24">
+        <el-form ref="queryForm" label-width="68px" :inline="true" :model="queryParams">
+          <div class="query-box">
+            <div class="query-box__left">
+              <el-form-item label="" prop="hospitalCode">
+                <el-select v-model="queryParams.hospitalCode" placeholder="医疗机构" filterable clearable>
+                  <el-option v-for="item in listMedicalMechanismArr" :key="item.id"
+                             :label="item.name" :value="item.code" :disabled="item.state !== '1'"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="" prop="areaName">
+                <el-input style="width: 240px" placeholder="煎药区名称" clearable size="small"
+                          v-model="queryParams.areaName" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+              <el-form-item label="" prop="areaCode">
+                <el-input style="width: 240px" placeholder="煎药区编号" clearable size="small"
+                          v-model="queryParams.areaCode" @keyup.enter.native="handleQuery"/>
+              </el-form-item>
+
+              <el-form-item label="" prop="toxicPieces">
+                <el-select v-model="queryParams.toxicPieces" placeholder="毒性饮片" filterable clearable>
+                  <el-option v-for="item in toxicOptions" :key="item.dictCode"
+                             :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="" prop="prescriptionUsageCode">
+                <el-select v-model="queryParams.prescriptionUsageCode" placeholder="处方用法" filterable clearable>
+                  <el-option v-for="item in usageMethodOptions" :key="item.dictCode"
+                             :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="" prop="areaType">
+                <el-select v-model="queryParams.areaType" placeholder="类型" filterable clearable>
+                  <el-option v-for="item in typeOptions" :key="item.dictCode"
+                             :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+                  />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="" prop="state">
+                <el-select v-model="queryParams.state" placeholder="状态" clearable>
+                  <el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"/>
+                </el-select>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+              </el-form-item>
+            </div>
+          </div>
+        </el-form>
+        <div style="display: flex; justify-content: space-between; margin-bottom: 12px; clear: both;">
+          <div>
+            <el-button type="primary" plain icon="el-icon-plus" size="mini"
+                       @click="handleEdit()"
+                       v-hasPermi="['decoct:station:add']"
+            >新增
+            </el-button>
+          </div>
+          <div>
+            <el-button size="mini" :disabled="selected.length === 0" v-has-permi="['decoct:station:edit']"
+                       @click="handleUpdate({ state: 0 })">启用
+            </el-button>
+            <el-button size="mini" :disabled="selected.length === 0" v-has-permi="['decoct:station:edit']"
+                       @click="handleUpdate({ state: 1 })">停用
+            </el-button>
+          </div>
+        </div>
+
+        <el-table v-loading="loading" :data="dataset" @selection-change="handleSelectionChange" border>
+          <el-table-column type="selection" width="50" align="center"/>
+          <el-table-column type="index" label="序号" align="center" width="55"/>
+          <el-table-column label="煎药区名称" prop="areaName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="煎药区编号" prop="areaCode" align="center"/>
+          <el-table-column label="毒性饮片" prop="toxicPieces" align="center">
+            <template slot-scope="scope">
+              {{ (toxicOptions.find(option => option.dictValue === scope.row.toxicPieces) || {}).dictLabel }}
+            </template>
+          </el-table-column>
+          <el-table-column label="处方用法" prop="prescriptionUsageName" align="center">
+            <!--<template slot-scope="scope">
+              {{ (usageMethodOptions.find(option => option.dictValue === scope.row.prescriptionUsageCode) || {}).dictLabel || scope.row.prescriptionUsageName }}
+            </template>-->
+          </el-table-column>
+
+          <el-table-column label="所属医疗机构" prop="hospitalName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="备用煎药区" prop="reserveAreaName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="对应待行区" prop="waitingName" align="center" :show-overflow-tooltip="true"/>
+          <el-table-column label="类型" prop="areaType" align="center">
+            <template slot-scope="scope">
+              {{ (typeOptions.find(option => option.dictValue === scope.row.areaType) || {}).dictLabel }}
+            </template>
+          </el-table-column>
+          <el-table-column label="煎药负责人" prop="decoctionManagerName" align="center"/>
+          <el-table-column label="包装规格" prop="packagingSpecifications" align="center" :show-overflow-tooltip="true">
+            <template slot-scope="scope">
+              {{ (scope.row.packagingSpecifications || '').split(',').filter(v => v != null && v !== '').map(v => `${v} ml`).join('  -  ') }}
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" prop="state" align="center">
+            <template slot-scope="scope">
+              {{ (stateOptions.find(option => option.value === scope.row.state) || {}).label }}
+            </template>
+          </el-table-column>
+          <!--<el-table-column label="创建时间" prop="createTime" align="center" :show-overflow-tooltip="true"/>-->
+          <!--<el-table-column label="更新时间" prop="createTime" align="center" :show-overflow-tooltip="true"/>-->
+          <el-table-column
+            label="操作"
+            align="center"
+            width="160"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="scope">
+              <el-button type="primary" style="width: 40px" size="mini"
+                         @click="handleEdit(scope.row)"
+                         v-hasPermi="['decoct:station:edit']"
+              >修改
+              </el-button>
+              <el-popconfirm style="margin-left: 10px;" v-hasPermi="['decoct:station:remove']" title="确定删除吗?"
+                             confirm-button-text="删除" confirm-button-type="danger" @confirm="handleDelete(scope.row)"
+              >
+                <template #reference>
+                  <el-button style="width: 40px" size="mini">删除</el-button>
+                </template>
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination v-show="total > 0" :total="total"
+                    :page.sync="queryParams.pageNum"
+                    :limit.sync="queryParams.pageSize"
+                    @pagination="getList"/>
+      </el-col>
+    </el-row>
+
+    <el-dialog class="edit-dialog-wrapper" :title="editTitle" :visible.sync="editOpen" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editModel" :rules="editRules" label-width="100px" @submit="handleEditSubmit()">
+        <el-form-item label="煎药区名称" prop="areaName">
+          <el-input v-model="editModel.areaName" placeholder="请输入煎药区名称" maxlength="30"/>
+        </el-form-item>
+        <el-form-item label="煎药区编号" prop="areaCode">
+          <el-input v-model="editModel.areaCode" placeholder="请输入煎药区编号" maxlength="30"/>
+        </el-form-item>
+        <el-form-item label="类型" prop="areaType">
+          <el-select v-model="editModel.areaType" placeholder="请选择类型" filterable>
+            <el-option v-for="item in typeOptions" :key="item.dictCode"
+                       :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="毒性饮片" prop="toxicPieces">
+          <el-select v-model="editModel.toxicPieces" placeholder="请选择毒性饮片" clearable filterable>
+            <el-option v-for="item in toxicOptions" :key="item.dictCode"
+                       :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="处方用法" prop="prescriptionUsageCode">
+          <el-select v-model="editModel.prescriptionUsageCode" placeholder="请选择处方用法" clearable filterable>
+            <el-option v-for="item in usageMethodOptions" :key="item.dictCode"
+                       :label="item.dictLabel" :value="item.dictValue" :disabled="item.status !== '0'"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="所属医疗机构" prop="hospitalCode">
+          <el-select v-model="editModel.hospitalCode" placeholder="请选择所属医疗机构" clearable filterable>
+            <el-option v-for="item in listMedicalMechanismArr" :key="item.id"
+                       :label="item.name" :value="item.code" :disabled="item.state !== '1'"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="包装规格" prop="packagingSpecifications">
+          <div style="display: flex">
+            <el-input placeholder="最小值" v-model.number="editModel.packagingSpecifications[0]">
+              <template slot="append">ml</template>
+            </el-input>
+            <div style="margin: 0 12px"></div>
+            <el-input placeholder="最大值" v-model.number="editModel.packagingSpecifications[1]">
+              <template slot="append">ml</template>
+            </el-input>
+          </div>
+        </el-form-item>
+        <el-form-item label="自立袋包装" prop="selfPackage">
+          <el-select v-model="editModel.selfPackage" placeholder="请选择" clearable>
+            <el-option label="是" value="2"/>
+            <el-option label="否" value="1"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备用煎药区" prop="reserveAreaCode">
+          <el-select v-model="editModel.reserveAreaCode" placeholder="请选择备用煎药区" clearable filterable>
+            <el-option v-for="item in stationOptionsForEdit" :key="item.id"
+                       :label="item.areaName" :value="item.areaCode" :disabled="item.state !== 0"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="对应待行区" prop="waitingCode">
+          <el-select v-model="editModel.waitingCode" placeholder="请选择对应待行区" clearable filterable>
+            <el-option v-for="item in routeOptions" :key="item.id"
+                       :label="item.areaName" :value="item.areaCode" :disabled="item.state !== 0"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="煎药负责人" prop="decoctionManagerId">
+          <el-select v-model="editModel.decoctionManagerId" placeholder="请选择煎药负责人" clearable filterable>
+            <el-option v-for="item in decoctionOptions" :key="item.userId"
+                       :label="item.nickName" :value="item.userId" :disabled="item.status !== '0'"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="派桶系数" prop="coefficient">
+          <el-input v-model.number="editModel.coefficient" placeholder="请输入派桶系数"/>
+        </el-form-item>
+        <el-form-item label="状态" prop="lineGroup">
+          <el-select v-model="editModel.state" placeholder="请选择状态">
+            <el-option v-for="item in stateOptions" :key="item.value"
+                       :label="item.label" :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <div style="display: flex;justify-content: space-between;align-items: center;">
+          <div style="color: #ff4949;">{{ editError }}</div>
+          <div>
+            <el-button type="primary" :loading="submitting" @click="handleEditSubmit()">保 存</el-button>
+            <el-button :disabled="submitting" @click="editOpen = false;">取 消</el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.edit-dialog-wrapper {
+  ::v-deep {
+    .el-select {
+      width: 100%;
+    }
+
+    .el-input-group {
+      border-top-left-radius: 8px;
+      border-bottom-left-radius: 8px;
+
+      .el-input__inner {
+        border-radius: inherit;
+      }
+
+      .el-input-group__append {
+        border-top-right-radius: 8px;
+        border-bottom-right-radius: 8px;
+      }
+    }
+  }
+}
+</style>

+ 12 - 16
src/views/drugs/alias/index.vue

@@ -407,22 +407,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有别名维护数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportAlias(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有别名维护数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportAlias(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     //通过别名获取五笔、拼音
     handleChangeName(e) {

+ 12 - 16
src/views/drugs/drugs/index.vue

@@ -1627,22 +1627,18 @@ export default {
         });
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品信息数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportDrugs(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品信息数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportDrugs(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     handleChangeName(e, num, index) {
       getInfo(e).then((res) => {

+ 0 - 19
src/views/drugs/map/index.vue

@@ -272,7 +272,6 @@ export default {
       this.exporting = true;
       try {
         const {blob, name = ''} = await drugsMapExport(this.backupsParams);
-        await this.download(blob, name);
         this.msgSuccess(`${name} 下载成功`);
       } catch (error) {}
       this.exporting = false;
@@ -281,7 +280,6 @@ export default {
       this.downloading = true;
       try {
         const {blob, name = ''} = await drugsMapImportTemplate(this.backupsParams);
-        await this.download(blob, name);
         this.msgSuccess(`${name} 下载成功`);
       } catch (e) { }
       this.downloading = false;
@@ -296,23 +294,6 @@ export default {
       } catch (e) {}
       this.uploading = false;
     },
-    download(blob, filename = '') {
-      const link = document.createElement('a');
-      document.body.appendChild(link);
-
-      const url = URL.createObjectURL(blob);
-      link.href = url;
-      link.download = filename;
-      link.click();
-
-      return new Promise(resolve => {
-        setTimeout(() => {
-          document.body.removeChild(link);
-          URL.revokeObjectURL(url);
-          resolve();
-        }, 20)
-      })
-    }
   },
 };
 </script>

+ 14 - 18
src/views/drugs/modifyPrice/index.vue

@@ -203,7 +203,7 @@
                 v-model="form.modifyNumber"
                 placeholder="请输入调价文号"
                 :disabled="disableDetails"
-                style="100%"
+                style="width: 100%;"
               />
             </el-form-item>
           </el-col>
@@ -268,7 +268,7 @@
                 v-model="form.remarks"
                 placeholder="请输入备注"
                 :disabled="disableDetails"
-                style="100%"
+                style="width: 100%;"
               />
             </el-form-item>
           </el-col>
@@ -1134,22 +1134,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有统一调价(整体)数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportTrimPrice(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有统一调价(整体)数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportTrimPrice(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/drugs/place/index.vue

@@ -375,22 +375,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品产地数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportPlace(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品产地数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportPlace(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     //通过产地名称获取五笔、拼音
     handleChangeName(e) {

+ 10 - 11
src/views/drugs/price/index.vue

@@ -358,19 +358,18 @@ export default {
         }).catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有价格信息数据项?', "警告", {
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有价格信息数据项?", "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportPrice(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+          type: "warning",
+        });
+        const data = await exportPrice(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     }
   }
 };

+ 10 - 11
src/views/drugs/specs/index.vue

@@ -436,19 +436,18 @@ export default {
         }).catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有药品规格数据项?', "警告", {
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品规格数据项?", "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportSpecs(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+          type: "warning",
+        });
+        const data = await exportSpecs(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     }
   }
 };

+ 12 - 16
src/views/inventory/SystemWin/index.vue

@@ -355,22 +355,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有窗口管理数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportSystemWin(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有窗口管理数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportSystemWin(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/inventory/drugDirectory/index.vue

@@ -375,22 +375,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportInventory(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/inventory/forward/index.vue

@@ -343,22 +343,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有库存结转数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportForward(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有库存结转数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportForward(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 17
src/views/inventory/inventory/index.vue

@@ -522,23 +522,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportInventory(queryParams);
-        })
-        .then((response) => {
-          //console.log(response)
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/inventory/inventoryWarning/index.vue

@@ -277,22 +277,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportInventory(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/inventory/modifyPrice/index.vue

@@ -1312,22 +1312,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有调价管理数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportModifyPrice(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有调价管理数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportModifyPrice(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/inventory/reporting/index.vue

@@ -982,22 +982,18 @@ export default {
       this.checkedReportingDetail = selection.map((item) => item.index);
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有报损单数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportReporting(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有报损单数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportReporting(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/inventory/takeInventory/index.vue

@@ -1332,22 +1332,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有盘存单数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportTakeInventory(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有盘存单数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportTakeInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 15
src/views/inventory/warehouse/index.vue

@@ -1022,22 +1022,19 @@ export default {
       this.checkedWarehouseDetail = selection.map((item) => item.index);
     },
     /** 导出按钮操作 */
-    handleExport() {
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有出库单数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportWarehouse(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
       const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有出库单数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportWarehouse(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
     },
   },
 };

+ 12 - 16
src/views/inventory/warehousing/index.vue

@@ -1140,22 +1140,18 @@ export default {
       this.checkedWarehouseDetail = selection.map((item) => item.index);
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有入库单数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportWarehousing(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有入库单数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportWarehousing(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/medical/community/index.vue

@@ -361,22 +361,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有医共体数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportCommunity(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有医共体数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportCommunity(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     //启用 / 禁用
     handleState(row, num) {

+ 13 - 17
src/views/medical/dept/index.vue

@@ -294,7 +294,7 @@ export default {
       if(val){
         this.getMechanismListArr(val)
       }
-     
+
     }
   },
   methods: {
@@ -423,22 +423,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有科室病区数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportDept(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        this.$confirm("是否确认导出所有科室病区数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportDept(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/medical/log/index.vue

@@ -698,22 +698,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有会计期间数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportLog(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有会计期间数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportLog(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 10 - 11
src/views/monitor/job/index.vue

@@ -530,19 +530,18 @@ export default {
         }).catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有定时任务数据项?", "警告", {
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportJob(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+          type: "warning",
+        });
+        const data = await exportJob(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     }
   }
 };

+ 10 - 11
src/views/monitor/job/log.vue

@@ -309,19 +309,18 @@ export default {
         }).catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有调度日志数据项?", "警告", {
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有调度日志数据项?", "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportJobLog(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+          type: "warning",
+        });
+        const data = await exportJobLog(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     }
   }
 };

+ 10 - 11
src/views/monitor/logininfor/index.vue

@@ -227,19 +227,18 @@ export default {
         }).catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportLogininfor(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+          type: "warning",
+        });
+        const data = await exportLogininfor(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     }
   }
 };

+ 12 - 16
src/views/monitor/operlog/index.vue

@@ -409,22 +409,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportOperlog(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportOperlog(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 44 - 3
src/views/pda/dispatch/index.vue

@@ -1,11 +1,12 @@
 <script>
-import {dispatchList} from '@/api/pda';
+import {dispatchList, exportDispatchReport} from '@/api/pda';
 import dayjs from 'dayjs';
 import PrintContainer from './printContainer.vue';
+import ScanPanel from '@/views/pda/dispatch/scanPanel.vue';
 
 export default {
   name: 'pda-dispatch',
-  components: {PrintContainer},
+  components: {ScanPanel, PrintContainer},
   data() {
     return {
       queryParams: {
@@ -21,6 +22,7 @@ export default {
       },
       // 遮罩层
       showSearch: true,
+      exporting: true,
       // 显示搜索条件
       loading: true,
       dataset: [],
@@ -46,6 +48,7 @@ export default {
         // { name: "煎药已作废", id: 999, key: "---" },
       ],
 
+      showScanPanel: false,
       showPrint: false,
       showPrintId: '',
       showPrintExpressCom: false,
@@ -69,9 +72,17 @@ export default {
       ];
       this.handleQuery();
     },
+    getQueryModel() {
+      const {date, ...form} = this.queryParams;
+      if (Array.isArray(date) && date.length) {
+        form.startTime = date[0];
+        form.endTime = date[1];
+      }
+      return form;
+    },
     getList() {
       this.loading = true;
-      const model = Object.assign({}, this.queryParams);
+      const model = this.getQueryModel();
       dispatchList(model).then((response) => {
         this.dataset = response.rows;
         this.total = response.total;
@@ -88,6 +99,30 @@ export default {
     handlePreview(row) {
 
     },
+    openScanPanel() {
+      this.showScanPanel = true;
+      this.$nextTick(() => {
+        const $scan = this.$refs.scan;
+        if ($scan && typeof $scan.open === 'function') return $scan.open();
+      });
+    },
+    closeScanPanel(done) {
+      this.$nextTick(() => {
+        const $scan = this.$refs.scan;
+        if ($scan && typeof $scan.close === 'function') return $scan.close();
+      });
+      done();
+    },
+
+    async exportData() {
+      const form = this.getQueryModel();
+      this.exporting = true;
+      try {
+        const data = await exportDispatchReport(form);
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (error) {}
+      this.exporting = false;
+    },
   },
 };
 </script>
@@ -155,6 +190,8 @@ export default {
           <el-form-item>
             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            <el-button type="primary"size="mini" v-hasPermi="['inventory:dispatch:export']" @click="exportData">导出</el-button>
+            <el-button icon="el-icon-printer" size="mini" v-hasPermi="['inventory:dispatch:scan']"  @click="openScanPanel">扫码枪</el-button>
           </el-form-item>
         </div>
       </div>
@@ -206,6 +243,10 @@ export default {
                        :load-express="showPrintExpressCom"
       />
     </el-dialog>
+
+    <el-dialog title="扫条码打印顺丰快递单" :visible.sync="showScanPanel" :before-close="closeScanPanel" width="60vim">
+      <scan-panel ref="scan"></scan-panel>
+    </el-dialog>
   </div>
 </template>
 

+ 2 - 2
src/views/pda/dispatch/printContainer.vue

@@ -19,7 +19,7 @@ export default {
   },
   watch: {},
   mounted() {
-    this.select(0);
+    this.select(this.loadExpress ? 0 : 1);
   },
   methods: {
     async print() {
@@ -60,7 +60,7 @@ export default {
         <print_express_75 ref="print0" :id="id" :style="style" @click="$event && update()"></print_express_75>
       </el-tab-pane>
       <el-tab-pane label="标签">
-        <Print_tag_60_40 ref="print1" :id="id" @click="$event && update(0)"></Print_tag_60_40>
+        <print_tag_60_40 ref="print1" :id="id" @click="$event && update(0)"></print_tag_60_40>
       </el-tab-pane>
     </el-tabs>
   </div>

+ 119 - 0
src/views/pda/dispatch/scanPanel.vue

@@ -0,0 +1,119 @@
+<script>
+import {dispatchList} from '@/api/pda';
+import {getExpressRecordParams} from '@/api/prescription/prescriptionAudit';
+import {sf_express_print} from '@/tools/print.tool';
+import dayjs from 'dayjs';
+
+let TAG;
+
+export default {
+  name: 'ScanPanel',
+  data() {
+    return {
+      loading: false,
+      keyword: '',
+      logs: [],
+    };
+  },
+  methods: {
+    async open() {
+      this.nonsupport();
+    },
+    async close() {
+      if (TAG) window.cancelAnimationFrame(TAG);
+      this.logs = [];
+      this.loading = false;
+    },
+    async search() {
+      if (this.loading) return;
+      this.loading = true;
+      const keyword = this.keyword.trim();
+      try {
+
+        let result = await dispatchList({pageNum: 1, pageSize: 1, orderNo: keyword});
+        if (result.code !== 200) throw {message: result.msg};
+
+        let data = result.rows[0];
+        if (!data) throw {message: `未查询到数据`};
+        if (data.expressExecutor !== '顺丰') throw {message: `无法打印,配送方式不是顺丰`};
+
+        result = await getExpressRecordParams({prescriptionCoreId: data.id});
+        if (result.code !== 200) throw {message: result.msg};
+
+        data = result.data;
+        await sf_express_print(data);
+        this.$message.success(`发送打印任务成功`);
+        this.logs.push({
+          time: dayjs().format('HH:mm:ss'),
+          state: 'success', keyword,
+          icon: 'el-icon-check', color: 'green',
+          message: `发送打印任务成功`,
+        });
+      } catch (error) {
+        this.$message.error(error.message);
+        this.logs.push({
+          time: dayjs().format('HH:mm:ss'),
+          state: 'danger', keyword,
+          icon: 'el-icon-close', color: 'red',
+          message: error.message,
+        });
+      }
+      this.$refs.input.focus();
+      this.$refs.main.scrollTop = 0;
+      this.keyword = '';
+      this.loading = false;
+    },
+
+
+    nonsupport() {
+      if (TAG) window.cancelAnimationFrame(TAG);
+      TAG = window.requestAnimationFrame(() => {
+        this.$refs.input.focus();
+        this.nonsupport();
+      });
+    },
+  },
+};
+</script>
+
+<template>
+  <div class="wrapper">
+    <div class="header">
+      <el-input ref="input" style="width: 80%;" v-model="keyword" placeholder="请输入或使用扫码枪操作" clearable
+                size="small" :disabled="loading"
+                @keyup.enter.native="search"/>
+    </div>
+    <div class="main" ref="main">
+      <el-timeline reverse>
+        <el-timeline-item
+          v-for="(log, index) in logs"
+          :key="index"
+          :icon="log.icon"
+          :color="log.color"
+          size="large" :type="log.state"
+          :timestamp="log.time" placement="top">
+          [{{ log.keyword }}] {{ log.message }}
+        </el-timeline-item>
+      </el-timeline>
+    </div>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.wrapper {
+  display: flex;
+  flex-direction: column;
+  height: 60vmin;
+}
+
+.header {
+  flex: none;
+  text-align: center;
+}
+
+.main {
+  flex: auto;
+  padding-top: 24px;
+  overflow-y: auto;
+}
+</style>

+ 47 - 45
src/views/pharmacy/mechanism/index.vue

@@ -25,7 +25,7 @@
               placeholder="请选择医共体"
               clearable
               size="small"
-              @change="handleComId"
+              @change="getMechanismListArr"
               style="width:160px"
             >
               <el-option
@@ -45,7 +45,7 @@
               placeholder="请选择医疗机构"
               clearable
               size="small"
-              @change="handleMechanismId"
+              @change="getDeptListArr"
             >
               <el-option
                 v-for="item in mechanismArr"
@@ -70,6 +70,7 @@
               style="width:160px"
               v-model="queryParams.deptId"
               placeholder="请选择科室病区"
+              :disabled="!queryParams.mechanismId"
             >
               <el-option
                 v-for="item in deptListArr"
@@ -359,9 +360,8 @@ export default {
     };
   },
   created() {
-    this.getList();
+    this.resetQuery()
     this.getMedicalPharmacy();
-    this.getCommunityList();
     // this.getMechanismListArr();
     // this.getListDeptArr();
     // this.getListDept();
@@ -422,24 +422,30 @@ export default {
         this.cimmunity = response.rows;
       });
     },
-    /** 通过医共体id查询机构 **/
-    handleChangeCommunity() {
-      if (this.form.communityId) {
-        this.getMechanismList(this.form.communityId);
-        this.form.mechanismId = null;
-        this.form.deptId = null;
+    /* [搜索] 获取机构 */
+    async getMechanismListArr(id) {
+      if (id) {
+        this.mechanismArr = await listMechanismId(id).then((response) => response.data)
+      } else {
+        this.mechanismArr = await listMedicalMechanism().then(response => response.data);
+      }
+      const mechanismId = this.queryParams.mechanismId;
+      if (mechanismId && !this.mechanismArr.find(item => +item.id === +mechanismId)) {
+        this.queryParams.mechanismId = ''
+        this.queryParams.deptId = ''
       }
     },
-    handleComId(e) {
-      //console.log(e);
-      this.getMechanismListArr(e);
-    },
-    getMechanismListArr(id) {
-      this.queryParams.mechanismId = ''
+    /* [搜索] 获取科室 */
+    async getDeptListArr(e) {
       this.queryParams.deptId = ''
-      listMedicalMechanism(id).then((response) => {
-        this.mechanismArr = response.data.filter(v => v.communityId == id);
-      });
+      this.deptListArr = [];
+      if (!e) return;
+      this.deptListArr = await getByMechanismId(e).then((response) => response.data);
+      const item = this.mechanismArr.find(item => +item.id === +e) || {};
+      if (!this.queryParams.communityId && item.communityId) {
+        this.queryParams.communityId = item.communityId;
+        await this.getMechanismListArr(item.communityId)
+      }
     },
     /** 查询医疗机构名称 **/
     getMechanismList(id) {
@@ -448,6 +454,14 @@ export default {
         this.mechanismId = null;
       });
     },
+    /** 通过医共体id查询机构 **/
+    handleChangeCommunity() {
+      if (this.form.communityId) {
+        this.getMechanismList(this.form.communityId);
+        this.form.mechanismId = null;
+        this.form.deptId = null;
+      }
+    },
     /** 通过医疗机构查询科室 **/
     handlechangeMechanidm() {
       if (this.form.mechanismId) {
@@ -456,16 +470,6 @@ export default {
         this.form.deptId = null;
       }
     },
-    handleMechanismId(e) {
-      this.queryParams.deptId = ''
-      this.getListDeptArr(e);
-    },
-    getListDeptArr(id) {
-      listDept(id).then((response) => {
-        this.deptListArr = response.rows.filter(v => v.communityId == id);
-        // //console.log(response.rows, "999");
-      });
-    },
     /** 查询科室名称 */
     getListDept(id) {
       getByMechanismId(id).then((response) => {
@@ -500,6 +504,8 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.getCommunityList();
+      this.getMechanismListArr();
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -574,22 +580,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有医疗机构与药房对照管理数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportMechanism(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有医疗机构与药房对照管理数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportMechanism(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 20 - 20
src/views/pharmacy/prescription/index.vue

@@ -215,7 +215,7 @@
     <!-- </el-row> -->
 
     <el-table
-      v-loading="loading"
+      v-loading="tableLoading"
       :data="prescriptionList"
       @selection-change="handleSelectionChange"
       :border="true"
@@ -450,6 +450,7 @@ export default {
       loading: true,
       // 导出遮罩层
       exportLoading: false,
+      tableLoading: false,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -601,11 +602,14 @@ export default {
     },
     /** 查询处方传输列表 */
     getList() {
-      this.loading = true;
+      this.tableLoading = true;
       listPrescription(this.queryParams).then((response) => {
-        this.prescriptionList = response.rows;
+        this.prescriptionList = Array.isArray(response.rows) ? response.rows.map(item => Object.assign(item, {
+          updateBy: item.updateBy|| item.createBy,
+          updateTime: item.updateTime|| item.createTime,
+        })) : []
         this.total = response.total;
-        this.loading = false;
+        this.tableLoading = false;
       });
     },
     /** 查询药房列表 */
@@ -815,22 +819,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有处方传输数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportPrescription(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有处方传输数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportPrescription(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 13 - 17
src/views/pharmacy/storage/index.vue

@@ -114,7 +114,7 @@
             node-key="id"
             @check="treeCheck"
             :default-checked-keys="pharmacyListArr"
-            ref="treeCheck" 
+            ref="treeCheck"
           >
           </el-tree>
         </el-form-item>
@@ -406,22 +406,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有出入库管理数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportStorage(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有出入库管理数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportStorage(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 13 - 17
src/views/pharmacy/supplier/index.vue

@@ -129,7 +129,7 @@
           :loading="exportLoading"
           @click="handleExport"
           v-hasPermi="['pharmacy:supplier:export']"
-        >导出</el-button> 
+        >导出</el-button>
       </el-col>-->
     <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
     <!-- </el-row> -->
@@ -454,22 +454,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有供货单位数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportSupplier(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有供货单位数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportSupplier(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     //通过医疗名称获取五笔、拼音
     handleChangeName(e) {

+ 48 - 16
src/views/pharmacyManagement/business/deploy/index.vue

@@ -81,6 +81,27 @@
               ></el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="" prop="isBehalf">
+            <el-select
+              v-model="queryParams.isBehalf"
+              placeholder="是否代煎"
+              style="width: 120px"
+            >
+              <el-option
+                v-for="item in isBehalfArr"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="expressExecutor">
+            <el-select style="width: 120px" v-model="queryParams.expressExecutor" placeholder="配送方式" clearable>
+              <el-option v-for="item in expressExecutorArr" :key="item.id"
+                         :label="item.name" :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <el-button
               type="primary"
@@ -127,6 +148,12 @@
           {{ scope.row.type === 1 ? "中药制剂" : "中药处方" }}
         </template>
       </el-table-column>
+      <el-table-column label="是否代煎" align="center" prop="isBehalf">
+        <template slot-scope="scope">
+          {{ {0: '否', 1: '是'}[scope.row.isBehalf] }}
+        </template>
+      </el-table-column>
+      <el-table-column label="配送方式" align="center" prop="expressExecutor"/>
       <el-table-column
         label="开方时间"
         align="center"
@@ -688,6 +715,15 @@ export default {
         { name: "发药", id: 3 },
         { name: "配送", id: 4 },
       ],
+      isBehalfArr: [
+        { name: "否", id: 0 },
+        { name: "是", id: 1 },
+      ],
+      expressExecutorArr: [
+        {name: '送医院', id: '送医院'},
+        {name: '顺丰', id: '顺丰'},
+        {name: '其他', id: '其他'},
+      ],
       deployStateArr: [
         { name: "已审核", id: 110, key: "audited" },
         // { name: "已审核不通过", id: 120, key: "---" },
@@ -1062,22 +1098,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportPrescriptionCore(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportPrescriptionCore(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     // 改变溯源记录的状态
     handleDeploy(item) {

+ 12 - 16
src/views/pharmacyManagement/business/drugDirectory/index.vue

@@ -362,22 +362,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportInventory(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 13 - 17
src/views/pharmacyManagement/business/expiryDateEnquiry/index.vue

@@ -381,7 +381,7 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
-  
+
       /*this.queryParams.startTime =
         this.time && this.formatTime(this.time[0], "yyyy-MM-dd");
       this.queryParams.endTime =
@@ -461,22 +461,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportInventory(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有药品库存数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 12 - 16
src/views/pharmacyManagement/business/putPosition/index.vue

@@ -380,22 +380,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有摆放位置数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportInventory(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有摆放位置数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportInventory(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 2 - 4
src/views/reportManagement/dispensing/index.vue

@@ -21,7 +21,7 @@
 	    <el-button size="mini" type="primary" @click="search">搜索</el-button>
 	    <el-button size="mini" type="primary" @click="clear">清空</el-button>
 	    <el-button size="mini" type="primary" @click="exportExcel">导出</el-button>
-	    <el-button size="mini" type="primary" @click="print">打印</el-button>
+      <!--<el-button size="mini" type="primary" @click="print">打印</el-button>-->
 	  	</div>
     <div class="content">
     	<el-table :data="tableData" size="mini" style="width: 100%" show-summary>
@@ -121,9 +121,7 @@ export default {
         form.endTime = this.date[1]
       }
       fySummaryExport(form).then(res => {
-        if (res.code == 200) {
-          this.download(res.msg)
-        }
+        this.$message.success(`导出 ${res.name} 成功`);
       })
     },
     print () {},

+ 2 - 4
src/views/reportManagement/expenditure/index.vue

@@ -13,7 +13,7 @@
 	    </el-date-picker>
 	    <el-button size="mini" type="primary" @click="search">搜索</el-button>
 	    <el-button size="mini" type="primary" @click="exportExcel">导出</el-button>
-	    <el-button size="mini" type="primary" @click="print">打印</el-button>
+      <!--<el-button size="mini" type="primary" @click="print">打印</el-button>-->
 	  	</div>
     <div class="content">
     	<el-table :data="tableData" class="exptable" size="mini" style="width: 100%" :row-class-name="tableRowClassName">
@@ -106,9 +106,7 @@ export default {
         startTime: startTime,
         endTime : endTime
       }).then(res => {
-        if (res.code == 200) {
-          this.download(res.msg)
-        }
+        this.$message.success(`导出 ${res.name} 成功`);
       })
     },
     handleCurrentChange(val) {

+ 2 - 4
src/views/reportManagement/put-in-stock/index.vue

@@ -20,7 +20,7 @@
       <el-button size="mini" type="primary" @click="search">搜索</el-button>
       <el-button size="mini" @click="clear">清空</el-button>
       <el-button size="mini" type="primary" @click="exportExcel">导出</el-button>
-      <el-button size="mini" type="primary" @click="print">打印</el-button>
+      <!--<el-button size="mini" type="primary" @click="print">打印</el-button>-->
   	</div>
     <div class="content">
       <el-table :data="tableData" size="mini" style="width: 100%" show-summary>
@@ -145,9 +145,7 @@ export default {
         form.endTime = this.date[1]
       }
       getWarehousingAndWarehouseExport(form).then(res => {
-        if (res.code == 200) {
-          this.download(res.msg)
-        }
+        this.$message.success(`导出 ${res.name} 成功`);
       })
     },
     print () {},

+ 185 - 0
src/views/reportManagement/transport/index.vue

@@ -0,0 +1,185 @@
+<script>
+import {listMedicalMechanism} from '@/api/medical/mechanism';
+import dayjs from 'dayjs';
+import {getByMechanismId, listDept} from '@/api/medical/dept';
+import {exportTransportReport, getTransportReport} from '@/api/inventory/inventory';
+
+export default {
+  name: 'report-transport',
+  data() {
+    const now = dayjs();
+    return {
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+
+        appId: null,
+        yljgId: '',
+        deptId: '',
+        isBehalf: '',
+        expressExecutor: '',
+        orderTime: [now.startOf('day').format('YYYY-MM-DD HH:mm:ss'), now.endOf('day').format('YYYY-MM-DD HH:mm:ss')],
+        yfId: window.localStorage.getItem('pharmacyId'),
+      },
+
+      listMedicalMechanismArr: [],
+      listDeptArr: [],
+      isBehalfArr: [
+        {name: '否', id: 0},
+        {name: '是', id: 1},
+      ],
+      expressExecutorArr: [
+        {name: '送医院', id: '送医院'},
+        {name: '顺丰', id: '顺丰'},
+        {name: '其他', id: '其他'},
+      ],
+      loading: false,
+      exporting: false,
+      total: 0,
+      dataset: [],
+    };
+  },
+  created() {
+    this.getListMedicalMechanism().then(first => {
+      if (!first) { throw {message: `暂无医疗机构可选,无法查询!`};}
+      return first.id;
+    }).then(id => {
+      this.getListDeptArr(id);
+      this.queryParams.yljgId = id;
+      return this.handleQuery();
+    }).catch(error => { this.$message.error(error.message); });
+  },
+  methods: {
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    resetQuery() {
+      this.resetForm('queryForm');
+      const now = dayjs();
+      this.queryParams.orderTime = [now.startOf('day').format('YYYY-MM-DD HH:mm:ss'), now.endOf('day').format('YYYY-MM-DD HH:mm:ss')];
+      this.handleMechanismId();
+      this.handleQuery();
+    },
+    handleMechanismId(e) {
+      this.queryParams.deptId = '';
+      this.getListDeptArr(e);
+    },
+    getQueryModel() {
+      const {orderTime, ...form} = this.queryParams;
+      if (Array.isArray(orderTime) && orderTime.length) {
+        form.startTime = orderTime[0];
+        form.endTime = orderTime[1];
+      }
+      if (form.yljgId) { form.hospitalName = this.listMedicalMechanismArr.find(item => item.id === form.yljgId).name; }
+      if (form.deptId) { form.department = this.listDeptArr.find(item => item.id === form.deptId).name; }
+      return form;
+    },
+    async getListMedicalMechanism() {
+      this.listMedicalMechanismArr = await listMedicalMechanism().then((res) => res.data);
+      return this.listMedicalMechanismArr[0];
+    },
+    async getListDeptArr(id) {
+      this.listDeptArr = id ? await getByMechanismId(id).then(res => res.data) : await listDept().then(res => res.rows);
+    },
+    async getList() {
+      this.loading = true;
+      const form = this.getQueryModel();
+      try {
+        const {rows, total} = await getTransportReport(form);
+        this.dataset = rows;
+        this.total = total;
+      } catch (e) { }
+      this.loading = false;
+    },
+    async exportData() {
+      const form = this.getQueryModel();
+      this.exporting = true;
+      try {
+        const data = await exportTransportReport(form);
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (error) {}
+      this.exporting = false;
+    },
+  },
+};
+</script>
+
+<template>
+  <div class="app-container">
+    <el-form ref="queryForm" :model="queryParams" inline label-suffix="68px">
+      <div class="query-box">
+        <div class="query-box__left">
+          <el-form-item label="" prop="yljgId">
+            <el-select style="width: 160px;" v-model="queryParams.yljgId" placeholder="请选择医疗机构"
+                       @change="handleMechanismId">
+              <el-option v-for="item in listMedicalMechanismArr" :key="item.id"
+                         :label="item.name" :value="item.id" :disabled="+item.state!==1"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="deptId">
+            <el-select style="width: 160px;" v-model="queryParams.deptId" placeholder="请选择科室" clearable>
+              <el-option v-for="item in listDeptArr" :key="item.id"
+                         :label="item.name" :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="orderTime">
+            <el-date-picker style="width: 340px" v-model="queryParams.orderTime"
+                            start-placeholder="开始时间" end-placeholder="结束时间"
+                            clearable size="small"
+                            type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="" prop="isBehalf">
+            <el-select style="width: 160px" v-model="queryParams.isBehalf" placeholder="是否代煎" clearable>
+              <el-option v-for="item in isBehalfArr" :key="item.id"
+                         :label="item.name" :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="expressExecutor">
+            <el-select style="width: 160px" v-model="queryParams.expressExecutor" placeholder="配送方式" clearable>
+              <el-option v-for="item in expressExecutorArr" :key="item.id"
+                         :label="item.name" :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            <el-button size="mini" type="primary" v-hasPermi="['inventory:transport:export']" @click="exportData">导出</el-button>
+          </el-form-item>
+        </div>
+      </div>
+    </el-form>
+    <el-table v-loading="loading" :data="dataset"
+              border size="mini">
+      <el-table-column type="index" width="55" align="center" label="序号"/>
+<!--      <el-table-column label="医疗机构" align="center" prop="hospitalName" show-overflow-tooltip/>-->
+      <el-table-column label="接方日期" align="center" prop="createTime"/>
+      <el-table-column label="处方号" align="center" prop="preNo"/>
+      <el-table-column label="患者" align="center" prop="name"/>
+      <el-table-column label="年龄" align="center" prop="age">
+        <template slot-scope="scope">{{ scope.row.age }}{{ scope.row.ageUnit || '岁' }}</template>
+      </el-table-column>
+      <el-table-column label="性别" align="center" prop="sex"/>
+      <el-table-column label="剂数" align="center" prop="number"/>
+      <el-table-column label="是否代煎" align="center" prop="isBehalf">
+        <template slot-scope="scope">{{ {0: '否', 1: '是'}[scope.row.isBehalf] }}</template>
+      </el-table-column>
+      <el-table-column label="配送方式" align="center" prop="expressExecutor"/>
+      <el-table-column label="备注" align="center" prop="entrust" show-overflow-tooltip/>
+    </el-table>
+    <pagination v-show="total > 0" :total="total"
+                :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+                @pagination="getList"
+    ></pagination>
+  </div>
+</template>
+
+<style scoped lang="scss">
+
+</style>

+ 12 - 16
src/views/rescription/Dispensing/index.vue

@@ -838,22 +838,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportPrescriptionCore(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportPrescriptionCore(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
 };

+ 108 - 48
src/views/rescription/prescriptionCore/edit.vue

@@ -5,7 +5,6 @@ import {transformFlatObjectToNested, transformNestedObjectToFlat} from '@/tools/
 import {bignumber, chain, multiply} from 'mathjs';
 import {
   addPrescriptionCore2,
-  check,
   check2,
   getPrescriptionCore2,
   getPrescriptionRS,
@@ -24,7 +23,7 @@ export default {
   data() {
     const locationValidator = (message) => (rule, value, callback) => {
       if (this.model.expressExecutor === '顺丰') {
-        if (!value.length) { return callback(new Error(message)); }
+        if (!value.length || (typeof value === 'string' && !value.trim())) { return callback(new Error(message)); }
       }
       callback();
     };
@@ -40,10 +39,10 @@ export default {
         age: [{required: true, message: '请输入年龄'}],
         // recipientTel: [{required: true, message: '请输入联系电话'}],
         expressExecutor: [{required: true, message: '请选择配送方式'}],
-        consignee: [{validator: locationValidator('请输入收件电话')}],
+        consignee: [{validator: locationValidator('请输入收件')}],
         contactNumber: [{validator: locationValidator('请输入收件电话')}],
         // location: [{validator: locationValidator('请选择所属地域')}],
-        address: [{required: true, message: '请输入详细地址'}],
+        address: [{validator: locationValidator('请输入详细地址')}],
       },
 
       ageOptions: [
@@ -73,6 +72,8 @@ export default {
       mechanismOptions: [],
       dosageFormOptions: [],
       usageOptions: [],
+      // 用法方式
+      usageMethodOptions: [],
       concentrationOptions: [],
       frequencyOptions: [],
       medicationTimeOptions: [],
@@ -81,6 +82,8 @@ export default {
       schemeOptions: [],
       patternOptions: [],
       regionOptions,
+      // 药品标记
+      drugMarkOptions: [],
       showPharmacy: false,
       searchTableForSystemColumns: [
         {title: '名称', data: 'drugsName'},
@@ -97,6 +100,9 @@ export default {
       showRS: false,
       rsLoading: false,
       rs: [],
+
+      /* 药品编辑替换 id */
+      replaceId: '',
     };
   },
   computed: {
@@ -142,12 +148,14 @@ export default {
     this.getMechanismList();
     this.getDicts('dosage_form').then((response) => {this.dosageFormOptions = response.data;});
     this.getDicts('pressure_pattern').then((response) => {this.patternOptions = response.data;});
-    this.getDicts('prescription.prescriptionUsage').then((response) => {this.usageOptions = response.data;});
+    this.getDicts('prescription_usage').then((response) => {this.usageOptions = response.data;});
     this.getDicts('prescription.concentration').then((response) => {this.concentrationOptions = response.data;});
-    this.getDicts('prescription.frequency').then((response) => {this.frequencyOptions = response.data;});
-    this.getDicts('prescription.medicationTime').then((response) => {this.medicationTimeOptions = response.data;});
-    this.getDicts('expressDech').then((response) => {this.expressDechOptions = response.data;});
-    this.getDicts('expressPayType').then((response) => {this.expressPayTypeOptions = response.data;});
+    this.getDicts('drug_frequency').then((response) => {this.frequencyOptions = response.data;});
+    this.getDicts('medication_time').then((response) => {this.medicationTimeOptions = response.data;});
+    this.getDicts('express_dech').then((response) => {this.expressDechOptions = response.data;});
+    this.getDicts('express_pay_type').then((response) => {this.expressPayTypeOptions = response.data;});
+    this.getDicts('usage_method').then((response) => {this.usageMethodOptions = response.data;});
+    this.getDicts('drug_mark').then((response) => {this.drugMarkOptions = response.data;});
     getSchemeList().then((response) => {this.schemeOptions = response.rows;});
   },
   mounted() {
@@ -219,6 +227,7 @@ export default {
         /* 19 处方用法 */ prescription_prescriptionUsage: '',
         /* 20 浓煎量   */ prescription_concentration: '',
         /* 21 服药频次 */ prescription_frequency: '',
+        /*    用法方式 */ prescription_usageMethod: '',
         /* 22 服药时间 */ prescription_medicationTime: '',
         /* 23 医嘱     */ prescription_entrust: '',
         /* 24 代煎     */ isBehalf: '',
@@ -283,7 +292,7 @@ export default {
         model['prescription'].drugs = medicines;
         model['prescription'].prescriptionPfSum = +this.medicineWholesalePriceTotal;
         model['prescription'].prescriptionYsSum = +this.medicineWholesalePriceTotal;
-        model['prescription'].prescriptionSum = +this.medicinePriceTotal;
+        // model['prescription'].prescriptionSum = +this.medicinePriceTotal;
 
         [model.province = '', model.city = '', model.region = ''] = this.model.location;
         delete model['location'];
@@ -324,6 +333,13 @@ export default {
         else delete model[`decoct_${key}`];
       }
     },
+    delayClick(id) {
+      const f = () => requestAnimationFrame(() => {
+        const dom = document.querySelector(`#s-${id}`);
+        if (!dom) f();
+      });
+      // f()
+    },
     searchMedicinesFormat(res) {
       try {
         if (res.rows) return {totalRow: res.total, list: res.rows};
@@ -332,6 +348,7 @@ export default {
     },
     selectMedicine([value], row, index) {
       if (value) {
+        row.invalid = !value.drugsId;
         row.matCode = value.drugsId;
         row.matName = value.drugsName;
         row.drugsSpecsName = value.drugsSpecsName;
@@ -342,6 +359,7 @@ export default {
         row.matPfj = value.matPfj;
         row.subtotalMoney = this.calculationMedicinePrice(row);
       } else {
+        delete row.invalid;
         delete row.matCode;
         delete row.matName;
         delete row.drugsSpecsName;
@@ -350,10 +368,13 @@ export default {
         delete row.matUnitName;
         delete row.matXsj;
         delete row.matPfj;
+        delete row.drugMark;
+        delete row.subtotalMoney;
         this.medicines.splice(index, 1, row);
       }
       if (this.getEmptyMedicineRowIndex === -1) this.appendMedicine({}, index + 1);
       if (this.showRS) this.loadRS();
+      this.replaceId = void 0;
     },
     appendMedicine(model, index = this.medicines.length) {
       this.medicines.splice(index, 0, model || {});
@@ -371,7 +392,7 @@ export default {
       return price.multiply(bignumber(medicine.matDose || 0)).value.valueOf();
     },
     medicinesCellSpan({row, column, rowIndex, columnIndex}) {
-      if (columnIndex >= 2 && !(row && row.matCode)) return {
+      if (columnIndex >= 2 && !(row && (row.invalid || row.matCode))) return {
         rowspan: 1,
         colspan: 8,
       };
@@ -566,23 +587,36 @@ export default {
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
-              <el-form-item label="服药频次" prop="prescription_frequency">
-                <el-select v-model="model.prescription_frequency" placeholder="请选择服药频次" clearable>
-                  <el-option v-for="item in frequencyOptions" :key="item.dictValue"
-                             :label="item.dictLabel" :value="item.dictValue"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="服药时间" prop="prescription_medicationTime">
-                <el-select v-model="model.prescription_medicationTime" placeholder="请选择服药时间" clearable>
-                  <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
-                             :label="item.dictLabel" :value="item.dictValue"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
+            <el-col :span="16">
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="服药频次" prop="prescription_frequency">
+                    <el-select v-model="model.prescription_frequency" placeholder="请选择服药频次" clearable>
+                      <el-option v-for="item in frequencyOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="用法方式" prop="prescription_usageMethod">
+                    <el-select v-model="model.prescription_usageMethod" placeholder="请选择用法方式" clearable>
+                      <el-option v-for="item in usageMethodOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="服药时间" prop="prescription_medicationTime">
+                    <el-select v-model="model.prescription_medicationTime" placeholder="请选择服药时间" clearable>
+                      <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </el-col>
             <el-col v-if="showPharmacy" :span="8">
               <el-form-item label="药房" prop="yfId">
@@ -809,7 +843,21 @@ export default {
               <el-table-column label="序号" type="index" width="55" align="center" fixed></el-table-column>
               <el-table-column label="药品名称" prop="matName" min-width="120px" align="center">
                 <template slot-scope="scope">
-                  <template v-if="!scope.row.matCode">
+                  <el-popover v-if="scope.row.invalid"  width="326" trigger="click" @after-enter="delayClick(scope.row.id)">
+                    <v-selectpage ref="selectPage" v-if="scope.row.id === replaceId" :id="'s-' + scope.row.id" :tb-columns="searchTableForSystemColumns"
+                                  key-field="drugsId" :show="true"
+                                  placeholder="请点击输入药品名称" title="替换药品"
+                                  data="drugsSearchForSystem" :params="{name: scope.row.matName}" :pagination="false"
+                                  :result-format="searchMedicinesFormat"
+                                  @values="selectMedicine($event, scope.row, scope.$index)"
+                    ></v-selectpage>
+                    <a slot="reference" class="replaceable" @click="(replaceId = scope.row.id);">
+                      {{ scope.row.matName }}
+                      <i class="icon el-icon-circle-close"
+                         @click.self="selectMedicine([], scope.row, scope.$index)"></i>
+                    </a>
+                  </el-popover>
+                  <template v-else-if="!scope.row.matCode">
                     <v-selectpage :tb-columns="searchTableForSystemColumns"
                                   key-field="drugsId" v-model="scope.row.matCode"
                                   placeholder="请输入药品名称" title="药品"
@@ -818,15 +866,15 @@ export default {
                                   @values="selectMedicine($event, scope.row, scope.$index)"
                     ></v-selectpage>
                   </template>
-                  <a v-else>
+                  <span v-else>
                     {{ scope.row.matName }}
-                    <i class="icon el-icon-circle-close" @click="selectMedicine([], scope.row, scope.$index)"></i>
-                  </a>
+                    <i class="icon el-icon-circle-close" style="cursor: pointer;" @click="selectMedicine([], scope.row, scope.$index)"></i>
+                  </span>
                 </template>
               </el-table-column>
               <el-table-column label="规格" prop="drugsSpecsName" min-width="110px" align="center"></el-table-column>
               <el-table-column label="剂量" prop="matDose" width="110px" align="center">
-                <template slot-scope="scope" v-if="scope.row.matCode">
+                <template slot-scope="scope" v-if="scope.row.matCode || scope.row.invalid">
                   <el-input-number style="width: 100%;" v-model="scope.row.matDose" :min="0" :precision="2"
                                    :controls="false"
                                    :disabled="saving" size="mini"
@@ -835,11 +883,20 @@ export default {
               </el-table-column>
               <el-table-column label="单位" prop="matUnitName" align="center"></el-table-column>
               <el-table-column label="用法" prop="matUsageName" width="110px" align="center">
-                <template slot-scope="scope" v-if="scope.row.matCode">
+                <template slot-scope="scope" v-if="scope.row.matCode || scope.row.invalid">
                   <el-input v-model="scope.row.matUsageName" :disabled="saving"
                             @input="updateMedicine(scope.row, scope.$index)"></el-input>
                 </template>
               </el-table-column>
+              <el-table-column label="标记" prop="drugMark" width="110px" align="center">
+                <template slot-scope="scope" v-if="scope.row.matCode || scope.row.invalid">
+                  <el-select v-model="scope.row.drugMark" placeholder="" clearable :disabled="saving">
+                    <el-option v-for="item in drugMarkOptions" :key="item.dictValue"
+                               :label="item.dictLabel" :value="item.dictValue"
+                    ></el-option>
+                  </el-select>
+                </template>
+              </el-table-column>
               <el-table-column label="批发价" prop="matPfj" width="110" align="center"></el-table-column>
               <el-table-column label="零售价" prop="matXsj" width="110" align="center"></el-table-column>
               <el-table-column label="小计" prop="subtotalMoney" width="110" align="center"></el-table-column>
@@ -996,6 +1053,10 @@ export default {
       }
     }
   }
+
+  .replaceable {
+    color: #ff4949;
+  }
 }
 
 .el-input-number--medium {
@@ -1077,22 +1138,21 @@ export default {
 }
 </style>
 <style lang="scss">
-.el-dialog {
-  &.prescription-core-edit-container {
-    overflow: hidden;
-  }
-
-  &__header {
-    flex: none;
-    padding: 12px 12px 0;
-  }
+.prescription-core-edit-container {
+  overflow: hidden;
+  &.el-dialog {
+    .el-dialog__header {
+      flex: none;
+      padding: 12px 12px 0;
+    }
 
-  &__body {
-    flex: auto;
-    padding: 12px;
+    .el-dialog__body {
+      flex: auto;
+      padding: 12px;
 
-    > * {
-      height: 100%;
+      > * {
+        height: 100%;
+      }
     }
   }
 }

+ 23 - 16
src/views/rescription/prescriptionCore/index.vue

@@ -1296,6 +1296,7 @@
     <el-dialog title="打印预览" :visible.sync="showPrint" @closed="showPrintId = ''">
       <print-container v-if="showPrintId" :id="showPrintId"
                        :load-express="showPrintExpressCom"
+                       :load-tag-s="showPrintTagSCom"
       />
     </el-dialog>
   </div>
@@ -1335,6 +1336,7 @@ import JsBarcode from "@/components/JsBarcode/index.vue";
 import Edit from "./edit.vue";
 import dayjs from "dayjs";
 import PrintContainer from '@/views/rescription/prescriptionCore/printContainer.vue';
+import {mapGetters} from 'vuex';
 
 // import JsBarcode from "jsbarcode"
 
@@ -1562,6 +1564,7 @@ export default {
     },
   },
   computed: {
+    ...mapGetters(["permissions"]),
     formattedDate() {
       const dateObj = new Date(this.curPatientBirthday);
       const year = dateObj.getFullYear();
@@ -1589,6 +1592,14 @@ export default {
         return "否";
       }
     },
+    // 打印加载小包标签组件
+    showPrintTagSCom() {
+      try {
+        return this.permissions.includes('rescription:prescriptionCore:print:tag_s')
+      } catch (e) {
+        return false;
+      }
+    }
   },
   methods: {
     countDose() {
@@ -2107,22 +2118,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportPrescriptionCore(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportPrescriptionCore(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
   },
   filters: {

+ 17 - 10
src/views/rescription/prescriptionCore/printContainer.vue

@@ -1,5 +1,6 @@
 <script>
 import Print_tag_80_50 from '@/components/print/tag_80_50.vue';
+import Print_tag_60_40 from '@/components/print/tag_60_40.vue';
 import Print_recipe_a5 from '@/components/print/recipe_A5.vue';
 import Print_ticket_72 from '@/components/print/ticket_72.vue';
 import Print_express_75 from '@/components/print/express_75.vue';
@@ -10,10 +11,13 @@ export default {
   props: {
     id: {type: [String, Number], required: true},
     loadExpress: {type: Boolean, default: false},
+    loadTagS: {type: Boolean, default: false},
   },
-  components: {Print_express_75, Print_ticket_72, Print_recipe_a5, Print_tag_80_50},
+  components: {Print_tag_60_40, Print_express_75, Print_ticket_72, Print_recipe_a5, Print_tag_80_50},
   data() {
-    return {};
+    return {
+      selected: 'print0',
+    };
   },
   computed: {
     height() { return `${window.innerHeight * 0.8}`; },
@@ -21,7 +25,7 @@ export default {
   },
   watch: {},
   mounted() {
-    this.select(0);
+    this.select(this.selected);
   },
   methods: {
     async print() {
@@ -44,9 +48,9 @@ export default {
         });
       }
     },
-    select(index) {
+    select(name) {
       try {
-        const el = this.$refs[`print${index}`];
+        const el = this.$refs[name];
         el['print'](true);
       } catch (e) {}
     }
@@ -57,17 +61,20 @@ export default {
 <template>
   <div>
     <el-button class="pin" type="primary" @click="print">组合打印</el-button>
-    <el-tabs tab-position="left" :style="style" @tab-click="select($event.index)">
-      <el-tab-pane label="标签">
+    <el-tabs tab-position="left" :style="style" v-model="selected" @tab-click="select($event.name)">
+      <el-tab-pane label="标签" name="print0">
         <print_tag_80_50 ref="print0" :id="id" @click="$event && update(0)"></print_tag_80_50>
       </el-tab-pane>
-      <el-tab-pane label="处方笺">
+      <el-tab-pane v-if="loadTagS" label="小包标签" name="print4">
+        <print_tag_60_40 ref="print4" :id="id" @click="$event && update(0)"></print_tag_60_40>
+      </el-tab-pane>
+      <el-tab-pane label="处方笺" name="print1">
         <print_recipe_a5 ref="print1" :id="id" :style="style" @click="$event && update(1)"></print_recipe_a5>
       </el-tab-pane>
-      <el-tab-pane label="药品清单">
+      <el-tab-pane label="药品清单" name="print2">
         <print_ticket_72 ref="print2" :id="id" :style="style" @click="$event && update(2)"></print_ticket_72>
       </el-tab-pane>
-      <el-tab-pane v-if="loadExpress" label="顺丰面单">
+      <el-tab-pane v-if="loadExpress" label="顺丰面单" name="print3">
         <print_express_75 ref="print3" :id="id" :style="style" @click="$event && update()"></print_express_75>
       </el-tab-pane>
     </el-tabs>

+ 75 - 38
src/views/rescription/prescriptionReception/edit.vue

@@ -73,6 +73,8 @@ export default {
       mechanismOptions: [],
       dosageFormOptions: [],
       usageOptions: [],
+      // 用法方式
+      usageMethodOptions: [],
       concentrationOptions: [],
       frequencyOptions: [],
       medicationTimeOptions: [],
@@ -81,6 +83,8 @@ export default {
       schemeOptions: [],
       patternOptions: [],
       regionOptions,
+      // 药品标记
+      drugMarkOptions: [],
       showPharmacy: false,
       searchTableForSystemColumns: [
         {title: '名称', data: 'drugsName'},
@@ -139,12 +143,14 @@ export default {
     this.getMechanismList();
     this.getDicts('dosage_form').then((response) => {this.dosageFormOptions = response.data;});
     this.getDicts('pressure_pattern').then((response) => {this.patternOptions = response.data;});
-    this.getDicts('prescription.prescriptionUsage').then((response) => {this.usageOptions = response.data;});
+    this.getDicts('prescription_usage').then((response) => {this.usageOptions = response.data;});
     this.getDicts('prescription.concentration').then((response) => {this.concentrationOptions = response.data;});
-    this.getDicts('prescription.frequency').then((response) => {this.frequencyOptions = response.data;});
-    this.getDicts('prescription.medicationTime').then((response) => {this.medicationTimeOptions = response.data;});
-    this.getDicts('expressDech').then((response) => {this.expressDechOptions = response.data;});
-    this.getDicts('expressPayType').then((response) => {this.expressPayTypeOptions = response.data;});
+    this.getDicts('drug_frequency').then((response) => {this.frequencyOptions = response.data;});
+    this.getDicts('medication_time').then((response) => {this.medicationTimeOptions = response.data;});
+    this.getDicts('express_dech').then((response) => {this.expressDechOptions = response.data;});
+    this.getDicts('express_pay_type').then((response) => {this.expressPayTypeOptions = response.data;});
+    this.getDicts('usage_method').then((response) => {this.usageMethodOptions = response.data;});
+    this.getDicts('drug_mark').then((response) => {this.drugMarkOptions = response.data;});
     getSchemeList().then((response) => {this.schemeOptions = response.rows;});
   },
   mounted() {
@@ -202,6 +208,7 @@ export default {
         /* 19 处方用法 */ prescription_prescriptionUsage: '',
         /* 20 浓煎量   */ prescription_concentration: '',
         /* 21 服药频次 */ prescription_frequency: '',
+        /*    用法方式 */ prescription_usageMethod: '',
         /* 22 服药时间 */ prescription_medicationTime: '',
         /* 23 医嘱     */ prescription_remark: '',
         /* 24 代煎     */ isBehalf: '',
@@ -365,6 +372,11 @@ export default {
         colspan: 8,
       };
     },
+
+    getDrugMark(value) {
+      const option = this.drugMarkOptions.find(item => item.dictValue === value);
+      return option ? option.dictLabel : '';
+    }
   },
 };
 </script>
@@ -551,25 +563,39 @@ export default {
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
-              <el-form-item label="服药频次" prop="prescription_frequency">
-                <el-select v-model="model.prescription_frequency" placeholder="服药频次" clearable
-                           :disabled="!editable">
-                  <el-option v-for="item in frequencyOptions" :key="item.dictValue"
-                             :label="item.dictLabel" :value="item.dictValue"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="服药时间" prop="prescription_medicationTime">
-                <el-select v-model="model.prescription_medicationTime" placeholder="服药时间" clearable
-                           :disabled="!editable">
-                  <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
-                             :label="item.dictLabel" :value="item.dictValue"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
+            <el-col :span="16">
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="服药频次" prop="prescription_frequency">
+                    <el-select v-model="model.prescription_frequency" placeholder="服药频次" clearable
+                               :disabled="!editable">
+                      <el-option v-for="item in frequencyOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="用法方式" prop="prescription_usageMethod">
+                    <el-select v-model="model.prescription_usageMethod" placeholder="用法方式" clearable
+                               :disabled="!editable">
+                      <el-option v-for="item in usageMethodOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8">
+                  <el-form-item label="服药时间" prop="prescription_medicationTime">
+                    <el-select v-model="model.prescription_medicationTime" placeholder="服药时间" clearable
+                               :disabled="!editable">
+                      <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </el-col>
             <el-col v-if="showPharmacy" :span="8">
               <el-form-item label="药房" prop="yfId">
@@ -815,6 +841,18 @@ export default {
                   <template v-else>{{ scope.row.matUsageName }}</template>
                 </template>
               </el-table-column>
+              <el-table-column label="标记" prop="drugMark" width="110px" align="center">
+                <template slot-scope="scope" v-if="scope.row.matCode">
+                  <template v-if="editable">
+                    <el-select v-model="scope.row.drugMark" placeholder="" clearable :disabled="saving">
+                      <el-option v-for="item in drugMarkOptions" :key="item.dictValue"
+                                 :label="item.dictLabel" :value="item.dictValue"
+                      ></el-option>
+                    </el-select>
+                  </template>
+                  <template v-else>{{ getDrugMark(scope.row.drugMark) }}</template>
+                </template>
+              </el-table-column>
               <el-table-column label="批发价" prop="matPfj" width="110" align="center"></el-table-column>
               <el-table-column label="零售价" prop="matXsj" width="110" align="center"></el-table-column>
               <el-table-column label="小计" prop="subtotalMoney" width="110" align="center"></el-table-column>
@@ -1009,22 +1047,21 @@ export default {
 }
 </style>
 <style lang="scss">
-.el-dialog {
-  &.prescription-core-edit-container {
-    overflow: hidden;
-  }
-
-  &__header {
-    flex: none;
-    padding: 12px 12px 0;
-  }
+.prescription-core-edit-container {
+  overflow: hidden;
+  &.el-dialog {
+    .el-dialog__header {
+      flex: none;
+      padding: 12px 12px 0;
+    }
 
-  &__body {
-    flex: auto;
-    padding: 12px;
+    .el-dialog__body {
+      flex: auto;
+      padding: 12px;
 
-    > * {
-      height: 100%;
+      > * {
+        height: 100%;
+      }
     }
   }
 }

+ 12 - 16
src/views/system/config/index.vue

@@ -436,22 +436,18 @@ export default {
         .catch(() => {});
     },
     /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm("是否确认导出所有参数数据项?", "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          this.exportLoading = true;
-          return exportConfig(queryParams);
-        })
-        .then((response) => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        })
-        .catch(() => {});
+    async handleExport() {
+      this.exportLoading = true;
+      try {
+        await this.$confirm("是否确认导出所有参数数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        const data = await exportConfig(this.queryParams)
+        this.$message.success(`导出 ${data.name} 成功`);
+      } catch (e) {}
+      this.exportLoading = false;
     },
     /** 刷新缓存按钮操作 */
     handleRefreshCache() {

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä