settlePrescriptionTable.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <template>
  2. <div class="prescriptionTable">
  3. <el-table
  4. v-if="prescription.type == 1"
  5. :data="prescription.advices"
  6. border
  7. style="width: 99%"
  8. :row-style="changColor"
  9. :header-cell-style="{
  10. backgroundColor: 'rgb(245, 247, 250)',
  11. color: '#606266',
  12. }"
  13. highlight-current-row
  14. >
  15. <el-table-column
  16. align="center"
  17. type="index"
  18. width="40"
  19. label="序号"
  20. ></el-table-column>
  21. <el-table-column align="center" prop="name" label="名称">
  22. <template slot-scope="scope"
  23. ><span :title="scope.row.drug_name">{{
  24. scope.row.drug_name
  25. }}</span></template
  26. >
  27. </el-table-column>
  28. <el-table-column align="center" prop="name" width="90" label="单次用量">
  29. <template slot-scope="scope">
  30. <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
  31. <div>
  32. {{ scope.row.single_dose }}&nbsp;&nbsp;{{
  33. scope.row.single_dose_unit
  34. }}
  35. </div>
  36. </template>
  37. </el-table-column>
  38. <el-table-column align="center" prop="name" width="100" label="用法">
  39. <template slot-scope="scope">
  40. <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
  41. <div>{{ scope.row.delivery_way }}</div>
  42. </template>
  43. </el-table-column>
  44. <el-table-column align="center" prop="name" width="100" label="频率">
  45. <template slot-scope="scope">
  46. <div>{{ scope.row.execution_frequency }}</div>
  47. <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
  48. </template>
  49. </el-table-column>
  50. <el-table-column align="center" prop="day" width="50" label="天数">
  51. <template slot-scope="scope">{{ scope.row.day }}天</template>
  52. </el-table-column>
  53. <el-table-column align="center" prop="name" width="100" label="总量">
  54. <template slot-scope="scope">
  55. <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
  56. <div>
  57. {{ scope.row.prescribing_number }}&nbsp;&nbsp;{{
  58. scope.row.prescribing_number_unit
  59. }}
  60. </div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column align="center" prop="name" width="60" label="单价">
  64. <template slot-scope="scope">
  65. <div>{{ scope.row.retail_price }}元</div>
  66. <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
  67. </template>
  68. </el-table-column>
  69. <el-table-column align="center" prop="name" width="60" label="总价">
  70. <template slot-scope="scope">
  71. <div>
  72. {{
  73. (scope.row.prescribing_number * scope.row.retail_price).toFixed(
  74. 2
  75. )
  76. }}元
  77. </div>
  78. <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
  79. </template>
  80. </el-table-column>
  81. <el-table-column align="center" prop="name" width="60" label="全自费金额">
  82. <template slot-scope="scope">
  83. <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
  84. </template>
  85. </el-table-column>
  86. <el-table-column align="center" prop="name" width="60" label="超限价金额">
  87. <template slot-scope="scope">
  88. <div>{{ scope.row.overlmt_amt }}元</div>
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. align="center"
  93. prop="name"
  94. width="60"
  95. label="先行自付金额"
  96. >
  97. <template slot-scope="scope">
  98. <div>{{ scope.row.preselfpay_amt }}元</div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. align="center"
  103. prop="name"
  104. width="60"
  105. label="符合正常范围金额"
  106. >
  107. <template slot-scope="scope">
  108. <div>{{ scope.row.inscp_scp_amt }}元</div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column align="center" prop="name" width="50" label="备注">
  112. <template slot-scope="scope">
  113. <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
  114. <div>{{ scope.row.remark }}</div>
  115. </template>
  116. </el-table-column>
  117. </el-table>
  118. <el-table
  119. v-if="prescription.type == 2"
  120. :data="prescription.project"
  121. border
  122. style="width: 99%"
  123. :row-style="changColor"
  124. :header-cell-style="{
  125. backgroundColor: 'rgb(245, 247, 250)',
  126. color: '#606266',
  127. }"
  128. highlight-current-row
  129. >
  130. <el-table-column
  131. align="center"
  132. type="index"
  133. width="40"
  134. label="序号"
  135. ></el-table-column>
  136. <el-table-column align="center" prop="project_name" label="名称">
  137. <template slot-scope="scope">{{ scope.row.project_name }}</template>
  138. </el-table-column>
  139. <el-table-column
  140. align="center"
  141. prop="statistical_classification"
  142. width="100"
  143. label="组"
  144. >
  145. <template slot-scope="scope">{{
  146. getGroup(scope.row.statistical_classification)
  147. }}</template>
  148. </el-table-column>
  149. <el-table-column
  150. align="center"
  151. prop="single_dose"
  152. width="80"
  153. label="单次用量"
  154. >
  155. <template slot-scope="scope"
  156. >{{ scope.row.single_dose }}{{ scope.row.unit }}</template
  157. >
  158. </el-table-column>
  159. <el-table-column
  160. align="center"
  161. prop="delivery_way"
  162. width="80"
  163. label="用法"
  164. >
  165. <template slot-scope="scope">
  166. <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
  167. {{ scope.row.delivery_way }}
  168. </template>
  169. </el-table-column>
  170. <el-table-column
  171. align="center"
  172. prop="execution_frequency"
  173. width="80"
  174. label="频率"
  175. >
  176. <template slot-scope="scope">
  177. <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
  178. {{ scope.row.execution_frequency }}
  179. </template>
  180. </el-table-column>
  181. <el-table-column
  182. align="center"
  183. prop="number_days"
  184. width="50"
  185. label="天数"
  186. >
  187. <template slot-scope="scope">
  188. <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
  189. {{ scope.row.number_days }}天
  190. </template>
  191. </el-table-column>
  192. <el-table-column align="center" prop="total" width="50" label="总量">
  193. <template slot-scope="scope">
  194. <div style="display: flex">
  195. <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
  196. {{ scope.row.total }} {{ scope.row.unit }}
  197. </div>
  198. </template>
  199. </el-table-column>
  200. <el-table-column align="center" prop="name" width="50" label="单价">
  201. <template slot-scope="scope">
  202. <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
  203. {{ scope.row.price }}元
  204. </template>
  205. </el-table-column>
  206. <el-table-column align="center" prop="name" width="60" label="总价">
  207. <template slot-scope="scope">
  208. <div>{{ (scope.row.total * scope.row.price).toFixed(2) }}元</div>
  209. <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
  210. </template>
  211. </el-table-column>
  212. <el-table-column align="center" prop="name" width="60" label="全自费金额">
  213. <template slot-scope="scope">
  214. <div>{{ scope.row.fulamt_ownpay_amt }}元</div>
  215. </template>
  216. </el-table-column>
  217. <el-table-column align="center" prop="name" width="60" label="超限价金额">
  218. <template slot-scope="scope">
  219. <div>{{ scope.row.overlmt_amt }}元</div>
  220. </template>
  221. </el-table-column>
  222. <el-table-column
  223. align="center"
  224. prop="name"
  225. width="60"
  226. label="先行自付金额"
  227. >
  228. <template slot-scope="scope">
  229. <div>{{ scope.row.preselfpay_amt }}元</div>
  230. </template>
  231. </el-table-column>
  232. <el-table-column
  233. align="center"
  234. prop="name"
  235. width="60"
  236. label="符合正常范围金额"
  237. >
  238. <template slot-scope="scope">
  239. <div>{{ scope.row.inscp_scp_amt }}元</div>
  240. </template>
  241. </el-table-column>
  242. <el-table-column align="center" prop="name" width="50" label="备注">
  243. <template slot-scope="scope">
  244. <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
  245. {{ scope.row.remark }}
  246. </template>
  247. </el-table-column>
  248. </el-table>
  249. <div class="additionalBox">
  250. <div
  251. class="additionalOne"
  252. v-for="(item, index) in prescription.addition"
  253. :key="index"
  254. >
  255. <span :title="item.item_name">{{ item.item_name }}</span>
  256. <el-input
  257. v-model="item.price"
  258. placeholder=""
  259. style="width: 50px"
  260. readonly
  261. ></el-input>
  262. <el-input
  263. v-model="item.count"
  264. placeholder=""
  265. style="width: 50px"
  266. readonly
  267. ></el-input>
  268. <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
  269. </div>
  270. </div>
  271. </div>
  272. </template>
  273. <script>
  274. import { getInitData } from "@/api/his/his";
  275. import { getDictionaryDataConfig } from "@/utils/data";
  276. export default {
  277. props: {
  278. prescription: Object,
  279. },
  280. data() {
  281. return {
  282. drugways: [],
  283. efs: [],
  284. };
  285. },
  286. mounted() {
  287. getInitData().then((response) => {
  288. if (response.data.state == 0) {
  289. this.$message.error(response.data.msg);
  290. return false;
  291. } else {
  292. this.drugways = response.data.data.drugways;
  293. this.efs = response.data.data.efs;
  294. }
  295. });
  296. },
  297. methods: {
  298. changColor({ row, rowIndex }) {
  299. if (rowIndex % 2 == 1) {
  300. // 变颜色的条件
  301. return {
  302. backgroundColor: "#C4E1FF",
  303. color: "#303133", // 这个return的就是样式 可以是color 也可以是backgroundColor
  304. };
  305. } else {
  306. return {
  307. backgroundColor: "#ACD6FF",
  308. color: "#303133",
  309. };
  310. }
  311. },
  312. getGroup(id) {
  313. var name = "";
  314. var statistics_category = getDictionaryDataConfig(
  315. "system",
  316. "statistics_category"
  317. );
  318. console.log("2235", statistics_category);
  319. for (let i = 0; i < statistics_category.length; i++) {
  320. if (id == statistics_category[i].id) {
  321. name = statistics_category[i].name;
  322. }
  323. }
  324. return name;
  325. },
  326. },
  327. };
  328. </script>
  329. <style lang="scss">
  330. .prescriptionTable {
  331. .additionalBox {
  332. margin-top: 20px;
  333. display: flex;
  334. flex-wrap: wrap;
  335. .additionalOne {
  336. margin-right: 20px;
  337. margin-bottom: 10px;
  338. display: flex;
  339. align-items: center;
  340. > span {
  341. white-space: nowrap;
  342. overflow: hidden;
  343. text-overflow: ellipsis;
  344. width: 80px;
  345. display: inline-block;
  346. font-size: 14px;
  347. }
  348. }
  349. .deleteIcon {
  350. color: red;
  351. margin-left: 5px;
  352. }
  353. }
  354. .el-table th .cell,
  355. .el-table td .cell {
  356. padding: 0 2px;
  357. white-space: pre-line;
  358. }
  359. .el-icon-delete {
  360. color: red;
  361. }
  362. }
  363. </style>