Browse Source

Merge branch 'master' into 'master'

新增重点监控药品标志维护

See merge request lighter/vue-intergration-platform!120
huangshuhua 11 months ago
parent
commit
0298c7de36
2 changed files with 51 additions and 2 deletions
  1. 12 0
      src/api/yp-dict/yp-dict-info.js
  2. 39 2
      src/views/yp-dict/YpDictInfo.vue

+ 12 - 0
src/api/yp-dict/yp-dict-info.js

@@ -154,4 +154,16 @@ export function updateYpWinningBidder(code, serial, flag) {
         method: 'get',
         params: { code, serial, flag },
     })
+}
+
+/**
+ * 更新重点监控药品标志(1:是)
+ * @returns
+ */
+export function updateYpFocusMonitor(code, serial, flag) {
+    return request({
+        url: '/ypDict/updateYpFocusMonitor',
+        method: 'get',
+        params: { code, serial, flag },
+    })
 }

+ 39 - 2
src/views/yp-dict/YpDictInfo.vue

@@ -43,7 +43,7 @@
           </el-table-column>
           <el-table-column prop="pyCode" label="拼音码" width="150" />
           <el-table-column prop="dCode" label="五笔码" width="150" />
-          <el-table-column fixed="right" label="操作" min-width="540" width="540" center>
+          <el-table-column fixed="right" label="操作" min-width="625" width="625" center>
             <template #default="scope">
               <el-button type="primary" size="small" v-if="!scope.row.isEdit"
                          @click="editYpDict(scope.row)">编辑</el-button>
@@ -55,6 +55,8 @@
                          v-if="!scope.row.isEdit" @click="highWarningDrug(scope.row)">高警示</el-button>
               <el-button :type="scope.row.winningBidderFlag === '1' ? 'primary' : 'info'" size="small"
                          v-if="!scope.row.isEdit" @click="winningBidderDrug(scope.row)">带量中选</el-button>
+              <el-button :type="scope.row.focusMonitorFlag === '1' ? 'primary' : 'info'" size="small"
+                         v-if="!scope.row.isEdit" @click="focusMonitorDrug(scope.row)">重点监控</el-button>
               <el-button type="primary" size="small" v-if="!scope.row.isEdit"
                          @click="editYpDictName(scope.row)">别名</el-button>
               <el-button :type="scope.row.delFlag === '1' ? 'info' : 'primary'" size="small"
@@ -103,7 +105,8 @@ import {
   updateYpStopOrUsed,
   updateYpTempPurchase,
   updateYpHighWarning,
-  updateYpWinningBidder
+  updateYpWinningBidder,
+  updateYpFocusMonitor
 } from '@/api/yp-dict/yp-dict-info.js'
 import YpZdDict from '@/views/yp-dict/YpZdDict.vue'
 import YpPrintName from '@/views/yp-dict/YpPrintName.vue'
@@ -464,6 +467,40 @@ const winningBidderDrug = (row) => {
     }
   })
 }
+// 重点监控药品维护
+const focusMonitorDrug = (row) => {
+  let flag
+  let title
+  if ('1' === row.focusMonitorFlag) {
+    flag = ''
+    title = '请确认是否取消重点监控药品<span style="color:#d12020;">' + row.name + '</span>?'
+  } else {
+    flag = '1'
+    title = '请确认是否将<span style="color:#d12020;">' + row.name + '</span>设置成重点监控药品?'
+  }
+
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    updateYpFocusMonitor(row.code, row.serial, flag).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      queryYpDict()
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      queryYpDict()
+    }
+  })
+}
 
 // 导出药品账页信息
 const exportData = () => {