EditInspection.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <el-dialog v-model="dialog" title="编辑检验"
  3. @close="guanBi">
  4. <el-pagination :current-page="index"
  5. :page-size="1"
  6. :total="count"
  7. background layout="total, prev, pager, next"
  8. @current-change="bianJiFenYe"/>
  9. <el-form label-width="100px" size="small" :model="bianJiJianChaShuJu">
  10. <el-row>
  11. <el-col :span="12">
  12. <el-form-item label="检查项目编码:">
  13. {{ bianJiJianChaShuJu.orderCode }}
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="12">
  17. <el-form-item label="检查项目名称:">
  18. {{ bianJiJianChaShuJu.orderName }}
  19. </el-form-item>
  20. </el-col>
  21. <el-col :span="12">
  22. <el-form-item class="bi_tian" label="检查时间:">
  23. <el-date-picker
  24. v-model="bianJiJianChaShuJu.startTime"
  25. ref="checkTheTimeRef"
  26. format="YYYY-MM-DD HH:mm:ss"
  27. style="width: 180px"
  28. type="datetime"
  29. value-format="YYYY-MM-DD HH:mm:ss"
  30. >
  31. </el-date-picker>
  32. </el-form-item>
  33. </el-col>
  34. <el-col :span="12">
  35. <el-form-item class="bi_tian" label="执行科室:">
  36. <xc-select-v3
  37. style="width: 120px"
  38. v-model="bianJiJianChaShuJu"
  39. :data="zhiXingKeShiData"
  40. code="execDept"
  41. name="execDeptName"
  42. :remote-method="metZhiXingKeShi"/>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="12">
  46. <el-form-item label="急诊:">
  47. <el-switch
  48. v-model="bianJiJianChaShuJu.jzFlag"
  49. :active-value="1"
  50. :inactive-value="0"
  51. active-color="#13ce66"
  52. active-text="急诊"
  53. inactive-color="#ff4949"
  54. inactive-text="普通"
  55. >
  56. </el-switch>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="12">
  60. <el-form-item label="自费:">
  61. <el-switch
  62. v-model="bianJiJianChaShuJu.ybSelfFlag"
  63. :active-value="1"
  64. :inactive-value="0"
  65. active-color="#13ce66"
  66. active-text="急诊"
  67. inactive-color="#ff4949"
  68. inactive-text="普通">
  69. </el-switch>
  70. </el-form-item>
  71. </el-col>
  72. <el-col v-if="jianCha" :span="12">
  73. <el-form-item class="bi_tian" label="临床诊断:" prop="diagCode">
  74. <xc-select-v3
  75. v-model="bianJiJianChaShuJu"
  76. :data="linChuangZhenDuanShuJu"
  77. :remote-method="linChuangZhenDuanSuoSou"
  78. code="diagCode"
  79. name="diagText"
  80. />
  81. </el-form-item>
  82. </el-col>
  83. <el-col v-if="jianCha" :span="12">
  84. <el-switch v-model="zhenDuanLaiYuan" :active-value="true" :inactive-value="false" active-color="#13ce66"
  85. active-text="医保" inactive-color="#ff4949" inactive-text="本院">
  86. </el-switch>
  87. </el-col>
  88. <el-col :span="24">
  89. <el-form-item v-if="!jianCha" class="bi_tian" label="标本:">
  90. <el-select v-model="bianJiJianChaShuJu.inspectStuff"
  91. :remote-method="biaoBenSouSuo"
  92. clearable filterable
  93. remote @change="bianBenMing">
  94. <el-option v-for="item in biaoBenShuJu" :key="item.code" :label="item.name" :value="item.code">
  95. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  96. <el-divider direction="vertical"></el-divider>
  97. <span>{{ item.name }}</span>
  98. </el-option>
  99. </el-select>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="12">
  103. <el-form-item :label="jianCha ? '病室摘要:' : '申请说明'" class="bi_tian">
  104. <el-input v-model="bianJiJianChaShuJu.reqComment" :rows="6" maxlength="125" show-word-limit
  105. type="textarea"></el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col v-if="jianCha" :span="12">
  109. <el-button @click="daKaiShuoMingMuBan">说明模板</el-button>
  110. </el-col>
  111. <el-col v-if="jianCha" :span="24">
  112. <el-form-item class="bi_tian" label="体征信息:">
  113. <el-input v-model="bianJiJianChaShuJu.reqTzComment" :rows="6" maxlength="125" show-word-limit
  114. type="textarea"></el-input>
  115. </el-form-item>
  116. </el-col>
  117. <el-col v-if="jianCha" :span="24">
  118. <el-form-item class="bi_tian" label="相关辅检结果:">
  119. <el-input v-model="bianJiJianChaShuJu.reqOtherResult" :rows="6" maxlength="125" show-word-limit
  120. type="textarea"></el-input>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :offset="20" :span="24">
  124. <el-button icon="Check" type="primary" @click="fillData">确定</el-button>
  125. </el-col>
  126. </el-row>
  127. </el-form>
  128. </el-dialog>
  129. <shuo-ming-mu-ban ref="shouMingMuBan" @huoQuXuanZhongShuJu="xuanZhongMuBan"></shuo-ming-mu-ban>
  130. </template>
  131. <!--编辑检验项目信息-->
  132. <script setup name="BianJiJianChaShenQing">
  133. import {computed, ref} from 'vue'
  134. import store from '@/store'
  135. import ShuoMingMuBan from '@/components/zhu-yuan-yi-sheng/jian-cha-shen-qing/ShuoMingMuBan.vue'
  136. import {ElMessage} from 'element-plus'
  137. import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
  138. import {biaoBenApi, diagnosisInOurHospital} from '@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing'
  139. import {logoutShortcut, xcHotKey} from '@/utils/xckeydown'
  140. import XcSelectV3 from "@/components/xiao-chan/select-v3/XcSelectV3.vue";
  141. import XcCode from "@/components/xiao-chan/code/XcCode";
  142. import {huoQuZhiXinKeShi} from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
  143. import {xuanZhongJianCha} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
  144. import {clone} from "@/utils/clone";
  145. const props = defineProps({
  146. jianCha: {
  147. type: Boolean,
  148. default: true,
  149. },
  150. })
  151. const emit = defineEmits(['fan-ye', 'dialogCloses'])
  152. const fillData = () => {
  153. let tData = bianJiJianChaShuJu.value
  154. xuanZhongJianCha.value.data.forEach((item, i) => {
  155. if (i !== index.value - 1) {
  156. item.execDept = tData.execDept
  157. item.execDeptName = tData.execDeptName
  158. item.jzFlag = tData.jzFlag
  159. item.ybSelfFlag = tData.ybSelfFlag
  160. item.diagCode = tData.diagCode
  161. item.diagText = tData.diagText
  162. item.inspectStuff = tData.inspectStuff
  163. item.inspectStuffName = tData.inspectStuffName
  164. item.reqComment = tData.reqComment
  165. }
  166. })
  167. guanBi()
  168. }
  169. const guanBi = () => {
  170. biaoBenShuJu.value = []
  171. linChuangZhenDuanShuJu.value = []
  172. bianJiJianChaShuJu.value = {}
  173. dialog.value = false
  174. logoutShortcut()
  175. emit('dialogCloses', {bianJiJianChaShuJu})
  176. }
  177. const windowSize = computed(() => {
  178. return store.state.app.windowSize
  179. })
  180. const dialog = ref(false)
  181. const bianJiJianChaShuJu = ref({})
  182. const shouMingMuBan = ref(null)
  183. const linChuangZhenDuanShuJu = ref([])
  184. const biaoBenShuJu = ref([])
  185. let checkTheTimeRef = $ref(null)
  186. const count = ref(0)
  187. const index = ref(0)
  188. // 诊断来源
  189. const zhenDuanLaiYuan = ref(false)
  190. const daKaiBenDuiHua = async (val, xiaBiao, zhongShu) => {
  191. dialog.value = true
  192. index.value = xiaBiao + 1
  193. count.value = zhongShu
  194. bianJiJianChaShuJu.value = val
  195. if (!props.jianCha) {
  196. if (stringNotBlank(val.inspectStuff)) {
  197. let index = biaoBenShuJu.value.findIndex(item => {
  198. return item.code === val.inspectStuff
  199. })
  200. if (index === -1) {
  201. biaoBenShuJu.value.push({code: val.inspectStuff, name: val.inspectStuffName})
  202. }
  203. }
  204. }
  205. }
  206. const daKaiShuoMingMuBan = () => {
  207. shouMingMuBan.value.dialog = true
  208. shouMingMuBan.value.huoQuShuoMingMuBan(0)
  209. }
  210. const xuanZhongMuBan = (val) => {
  211. if (stringIsBlank(bianJiJianChaShuJu.value.reqComment)) {
  212. bianJiJianChaShuJu.value.reqComment = ''
  213. }
  214. if (val.length + bianJiJianChaShuJu.value.reqComment.length > 125) {
  215. return ElMessage.error('字符超长无法添加,病室摘要最多125个字。')
  216. }
  217. bianJiJianChaShuJu.value.reqComment += val + ','
  218. ElMessage.success('复制成功。')
  219. }
  220. /**
  221. * 临床诊断搜索
  222. * @param val
  223. */
  224. const linChuangZhenDuanSuoSou = (val) => {
  225. diagnosisInOurHospital(val).then((res) => {
  226. linChuangZhenDuanShuJu.value = res
  227. })
  228. }
  229. const bianJiFenYe = async (val) => {
  230. biaoBenShuJu.value = []
  231. linChuangZhenDuanShuJu.value = []
  232. index.value = val
  233. emit('fan-ye', {val})
  234. }
  235. const bianBenMing = (val) => {
  236. for (let item of biaoBenShuJu.value) {
  237. if (item.code === val) {
  238. return (bianJiJianChaShuJu.value.inspectStuffName = item.name)
  239. }
  240. }
  241. }
  242. const biaoBenSouSuo = (val) => {
  243. if (val.length > 1) {
  244. biaoBenApi(val).then((res) => {
  245. biaoBenShuJu.value = res
  246. })
  247. }
  248. }
  249. /* 获取执行科室 */
  250. const zhiXingKeShiData = ref([])
  251. const metZhiXingKeShi = (val) => {
  252. huoQuZhiXinKeShi(val).then((res) => {
  253. zhiXingKeShiData.value = res
  254. })
  255. }
  256. defineExpose({daKaiBenDuiHua})
  257. </script>
  258. <style scoped></style>