فهرست منبع

医生基础字典手术分类和检验试管

lihong 3 ماه پیش
والد
کامیت
a2be62da0f
2فایلهای تغییر یافته به همراه448 افزوده شده و 0 حذف شده
  1. 71 0
      src/api/dictionary/doctoc-base-zd/doctoc-base-zd.js
  2. 377 0
      src/views/dictionary/doctoc-base-zd/DoctocBaseZd.vue

+ 71 - 0
src/api/dictionary/doctoc-base-zd/doctoc-base-zd.js

@@ -0,0 +1,71 @@
+import request from '../../../utils/request'
+
+/**
+ * 查询试管收费
+ * @param {*} code 编码
+ * @returns
+ */
+export function queryJyZdTubeChargeByCode(code) {
+    return request({
+        url: '/doctorBaseZd/queryJyZdTubeChargeByCode',
+        method: 'get',
+        params: { code },
+    })
+}
+
+/**
+ *
+ * @param {*} data
+ * @returns
+ */
+export function queryDoctorBaseZd(data) {
+    return request({
+        url: '/doctorBaseZd/queryDoctorBaseZd',
+        method: 'post',
+        data
+    })
+}
+
+export function updateDelFlag(data) {
+    return request({
+        url: '/doctorBaseZd/updateDelFlag',
+        method: 'post',
+        data
+    })
+}
+
+export function saveDoctorBaseZd(data) {
+    return request({
+        url: '/doctorBaseZd/saveDoctorBaseZd',
+        method: 'post',
+        data
+    })
+}
+export function deleteZdTubeCharge(data) {
+    return request({
+        url: '/doctorBaseZd/deleteZdTubeCharge',
+        method: 'post',
+        data
+    })
+}
+export function queryZdItemChargePage(data) {
+    return request({
+        url: '/doctorBaseZd/queryZdItemChargePage',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 保存试管收费
+ * @param data
+ * @returns {*}
+ */
+export function batchJyZdTubeCharge(data) {
+    return request({
+        url: '/doctorBaseZd/batchJyZdTubeCharge',
+        method: 'post',
+        data
+    })
+}
+

+ 377 - 0
src/views/dictionary/doctoc-base-zd/DoctocBaseZd.vue

@@ -0,0 +1,377 @@
+<template>
+  <el-tabs v-model="activeName" class="el-tabs__fill">
+    <el-tab-pane
+        label="手术分类字典"
+        name="one"
+    >
+      <div class="layout_container">
+        <header>
+          <el-input  size="small" v-model="oprKeyWard" style="width: 120px" placeholder="请输入查询条件"></el-input>
+          <el-button type="primary" icon="Search" @click="queryOpr" style="margin-left: 5px">查询</el-button>
+          <el-button type="success" icon="Plus" @click="addOpr" style="margin-left: 5px">新增</el-button>
+        </header>
+        <div class="layout_main">
+          <el-table :data="oprData" border style="width: 100%" stripe highlight-current-row
+                 height="100%"   >
+            <el-table-column type="index" label="序号" width="100" />
+            <el-table-column prop="delFlag" label="有效标识" width="200">
+              <template v-slot="scope">
+                <span v-if="scope.row.delFlag ==='0' ">有效</span>
+                <span v-else style="color:red;">停用</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="newCode" label="手术分类编码" width="200">
+              <template v-slot="scope">
+                <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.newCode"></el-input>
+                <span v-else>{{ scope.row.newCode }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="name" label="分类名称" width="280">
+              <template v-slot="scope">
+                <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.name"></el-input>
+                <span v-else>{{ scope.row.name }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="pyCode" label="拼音码" width="200" />
+            <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
+              <template #default="scope">
+                <el-button type="primary" size="small" v-if="!scope.row.isEdit"
+                           @click="editOpr(scope.row)">编辑</el-button>
+                <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                           @click="saveOpr(scope.row)">保存</el-button>
+                <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                           @click="queryOpr">取消
+                </el-button>
+                <el-button type="success" size="small" v-if="scope.row.delFlag ==='1'"
+                           @click="updateOprOrSgDelFlag(scope.row.code,'0','ysh_zd_ss_type')">
+                  启用
+                </el-button>
+                <el-button type="danger" size="small" v-else
+                           @click="updateOprOrSgDelFlag(scope.row.code,'1','ysh_zd_ss_type')">
+                  停用
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </el-tab-pane>
+    <el-tab-pane
+        label="检验试管字典"
+        name="two"
+    >
+      <div class="layout_container">
+        <header>
+          <el-input  size="small" v-model="sgKeyWard" style="width: 120px" placeholder="请输入查询条件"></el-input>
+          <el-select style="width: 80px" v-model="sgDelFlag" clearable placeholder="请选择">
+            <el-option value="-1" label="全部"></el-option>
+            <el-option value="0" label="有效"></el-option>
+            <el-option value="1" label="停用"></el-option>
+          </el-select>
+          <el-button type="primary" icon="Search" @click="querySgZd" style="margin-left: 5px">查询</el-button>
+          <el-button type="success" icon="Plus" @click="addSgZd" style="margin-left: 5px">新增</el-button>
+        </header>
+        <div class="layout_main">
+          <div style="height: 50%">
+            <el-table :data="sgData" border style="width: 100%" stripe highlight-current-row @row-click="fetchSgChare"
+                   height="100%"  >
+              <el-table-column type="index" label="序号" width="100" />
+              <el-table-column prop="delFlag" label="有效标识" width="200">
+                <template v-slot="scope">
+                  <span v-if="scope.row.delFlag ==='0' ">有效</span>
+                  <span v-else style="color:red;">停用</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="newCode" label="编码" width="200">
+                <template v-slot="scope">
+                  <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.newCode"></el-input>
+                  <span v-else>{{ scope.row.newCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="name" label="试管组名称" width="280">
+                <template v-slot="scope">
+                  <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.name"></el-input>
+                  <span v-else>{{ scope.row.name }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="pyCode" label="拼音码" width="200" />
+              <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
+                <template #default="scope">
+                  <el-button type="primary" size="small" v-if="!scope.row.isEdit"
+                             @click="editOpr(scope.row)">编辑</el-button>
+                  <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                             @click="saveSg(scope.row)">保存</el-button>
+                  <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                             @click="querySgZd">取消
+                  </el-button>
+                  <el-button type="success" size="small" v-if="scope.row.delFlag ==='1'"
+                             @click="updateOprOrSgDelFlag(scope.row.code,'0','jy_zd_tube')">
+                    启用
+                  </el-button>
+                  <el-button type="danger" size="small" v-else
+                             @click="updateOprOrSgDelFlag(scope.row.code,'1','jy_zd_tube')">
+                    停用
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <el-divider border-style="dashed" />
+          <div style="height: 40%">
+            <el-table :data="sgChargeData" border style="width: 100%" stripe highlight-current-row
+                      height="100%"     >
+              <el-table-column type="index" label="序号" width="100" />
+              <el-table-column prop="delFlag" label="有效标识" width="100">
+                <template v-slot="scope">
+                  <span v-if="scope.row.delFlag ==='0' ">有效</span>
+                  <span v-else style="color:red;">停用</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="code" label="试管组编码" width="100"/>
+              <el-table-column prop="chargeCode" label="收费编码" width="100">
+                <template v-slot="scope">
+                  <el-popover v-if="scope.row.isEdit" :visible="visible" :width="700" trigger="click">
+                    <template #reference>
+                      <el-input  v-model="scope.row.chargeCode"    @click="selectRowZdCharge(scope.row,scope.$index)" style="width: 100px" clearable />
+                    </template>
+                    <div style="width: 670px;">
+                      <el-input v-model="zdItemChargeParam.keyWard" placeholder="查询条件" clearable style="width: 100px"></el-input>
+                      <el-button icon="Search" type="primary" @click="selectZdItemCharge">查询</el-button>
+                    </div>
+                    <div style="width: 650px;">
+                      <el-table :data="zdItemChargeList" style="width: 100%" @row-click="fetchZdItemCharge"  height="400">
+                        <el-table-column width="120" property="code" label="收费编码" />
+                        <el-table-column width="250" property="name" label="项目名称" />
+                        <el-table-column width="100" property="chargeUnit" label="单位" />
+                        <el-table-column width="100" property="chargeAmount" label="收费金额" />
+                        <el-table-column width="80" property="selfFlag" label="自费" >
+                          <template v-slot="scope">
+                            <span v-if="scope.row.selfFlag ===1 ">自费</span>
+                            <span v-else >非自费</span>
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                      <el-pagination
+                          @size-change="handleSizeChange"
+                          @current-change="handleCurrentChange"
+                          :current-page="zdItemChargeParam.currentPage"
+                          small="small"
+                          :page-sizes="[15, 30, 45]"
+                          :page-size="zdItemChargeParam.pageSize"
+                          layout="total, sizes, prev, pager, next, jumper"
+                          :total="zdItemChargeParam.totalSize"
+                          style="margin-top: 5px;"
+                      ></el-pagination>
+                    </div>
+                    <div style="text-align: center;margin-top: 5px">
+                      <el-button size="small" type="danger" @click="visible = false">关闭</el-button>
+                    </div>
+                  </el-popover>
+                  <span v-else>{{ scope.row.chargeCode }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="amount" label="数量" width="150">
+                <template v-slot="scope">
+                  <el-input-number v-if="scope.row.isEdit" :min="1"  controls-position="right" size="small" v-model="scope.row.amount"></el-input-number>
+                  <span v-else>{{ scope.row.amount }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column prop="name" label="收费名称" width="300" />
+              <el-table-column prop="chargeAmount" label="单价" width="100" />
+              <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
+                <template #header>
+                  <el-button type="success" size="small"
+                             @click="addSgCharge">新增</el-button>
+                  <el-button type="primary" size="small"
+                             @click="saveSgCharge">保存</el-button>
+                </template>
+                <template #default="scope">
+                  <el-button type="primary" size="small" v-if="!scope.row.isEdit"
+                             @click="editOpr(scope.row)">编辑</el-button>
+                  <el-button type="danger" size="small"
+                             @click="deleteSgCharge(scope.row,scope.$index)">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+      </div>
+    </el-tab-pane>
+  </el-tabs>
+</template>
+<script setup >
+import {
+queryDoctorBaseZd,
+    queryJyZdTubeChargeByCode,
+    saveDoctorBaseZd,
+    batchJyZdTubeCharge,
+  queryZdItemChargePage,
+  deleteZdTubeCharge,
+    updateDelFlag
+} from "@/api/dictionary/doctoc-base-zd/doctoc-base-zd"
+import {ElMessageBox} from "element-plus";
+import {stringIsBlank} from "@/utils/blank-utils.js";
+const activeName = ref("one")
+const oprData = ref([])
+const oprKeyWard = ref('')
+const sgKeyWard = ref('')
+const sgDelFlag = ref('-1')
+const visible = ref(false)
+const zdItemChargeParam = ref({
+  keyWard:'',
+  currentPage:1,
+  pageSize:15,
+  totalSize:0,
+})
+
+const zdItemChargeList = ref([])
+const selectZdItemCharge = ()=>{
+  queryZdItemChargePage(zdItemChargeParam.value).then(res=>{
+    zdItemChargeParam.value.totalSize = res.total ? res.total : 0
+    zdItemChargeList.value = res.data ? res.data : []
+  })
+}
+
+const rowZdChargeIndex = ref(null)
+const selectRowZdCharge = (row,index)=>{
+  visible.value = true
+  rowZdChargeIndex.value =index
+}
+
+const fetchZdItemCharge = (row)=>{
+  sgChargeData.value[rowZdChargeIndex.value].chargeCode = row.code
+  sgChargeData.value[rowZdChargeIndex.value].name = row.name
+  sgChargeData.value[rowZdChargeIndex.value].chargeAmount = row.chargeAmount
+   visible.value = false
+}
+
+const handleSizeChange = (val) => {
+  zdItemChargeParam.value.pageSize = val
+  selectZdItemCharge()
+}
+const handleCurrentChange = (val) => {
+  zdItemChargeParam.value.currentPage = val
+  selectZdItemCharge()
+}
+
+const queryOpr = ()=>{
+  queryDoctorBaseZd({
+    keyWard :oprKeyWard.value,
+    tableName :'ysh_zd_ss_type'
+  }).then(res=>{
+    oprData.value = res
+  })
+}
+
+const selectRowData = ref({})
+const fetchSgChare = (row)=>{
+  selectRowData.value = row
+  queryJyZdTubeChargeByCode(row.newCode).then(res=>{
+    sgChargeData.value = res
+  })
+}
+const sgData = ref([])
+const sgChargeData = ref([])
+const querySgZd = ()=>{
+  sgChargeData.value = []
+  queryDoctorBaseZd({
+    keyWard :sgKeyWard.value,
+    delFlag :sgDelFlag.value,
+    tableName :'jy_zd_tube'
+  }).then(res=>{
+    sgData.value = res
+  })
+}
+
+const deleteSgCharge = (row,index)=>{
+  if(stringIsBlank(row.code)){
+    sgChargeData.value.splice(index,1)
+  }else {
+    ElMessageBox.confirm("请确认是否删除", {
+      cancelButtonText: "取消",
+      confirmButtonText: "确定",
+    })
+        .then(() => {
+          row.code = selectRowData.value.newCode
+          deleteZdTubeCharge(row).then(res=>{
+            fetchSgChare(selectRowData.value)
+          })
+
+        })
+  }
+}
+
+const addSgZd = ()=>{
+  sgData.value.push({
+    delFlag:'0',
+    code:'',
+    newCode:'',
+    name:'',
+    isEdit:true
+  })
+}
+
+const editOpr = (row)=>{
+  row.isEdit =true
+}
+
+const saveOpr = (row)=>{
+  row.tableName ='ysh_zd_ss_type'
+    saveDoctorBaseZd(row).then(res=>{queryOpr()})
+}
+
+const addSgCharge = ()=>{
+  sgChargeData.value.push({
+    delFlag : '0',
+    chargeCode : '',
+    amount : 1,
+    name :'',
+    chargeAmount :null,
+    isEdit : true
+  })
+}
+
+const saveSgCharge = ()=>{
+  let param = {
+    code : selectRowData.value.newCode,
+    saveData :sgChargeData.value
+  }
+  batchJyZdTubeCharge(param).then(res=>{
+    fetchSgChare(selectRowData.value)
+  })
+}
+
+const saveSg = (row)=>{
+  row.tableName ='jy_zd_tube'
+  saveDoctorBaseZd(row).then(res=>{querySgZd()})
+}
+
+
+const addOpr = ()=>{
+  oprData.value.push({
+    delFlag:'0',
+    code:'',
+    newCode:'',
+    name:'',
+    isEdit:true
+  })
+}
+
+const updateOprOrSgDelFlag = (code,delFlag,tableName)=>{
+   updateDelFlag({
+     code:code,
+     delFlag:delFlag,
+     tableName :tableName
+   }).then(res=>{
+     if(tableName === 'ysh_zd_ss_type'){
+       queryOpr()
+     }else {
+       querySgZd()
+     }
+   })
+}
+
+</script>
+<style scoped lang="scss">
+
+</style>