Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

prescriptionTemplatedetail.vue 102KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688
  1. <template>
  2. <div class="main-contain new-main-contain">
  3. <div style="height: calc(100% - 0px);display: flex;flex-direction: column;">
  4. <div style="display:flex;justify-content: space-between;align-items:center;margin:10px 0;padding:0 10px;color:#606266;">
  5. <div style="font-size:14px;">姓名:{{ $route.query.patient_name }}</div>
  6. <el-button size="small" @click="save" type="primary">保存</el-button>
  7. </div>
  8. <div class="mainCenter" style="padding:0 10px;" v-loading="loading">
  9. <div class="centerLeft">
  10. <el-form :model="tempForm" ref="tempForm" label-width="80px"
  11. style="display: flex;flex-wrap: wrap;justify-content: space-between;">
  12. <el-form-item label="模版名称:" prop="name" label-position="right">
  13. <el-input v-model="tempForm.name" placeholder=""></el-input>
  14. </el-form-item>
  15. <!-- <el-button @click="lili">调试</el-button>-->
  16. <el-form-item label="透析模式: " prop="mode_id" label-position="right">
  17. <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
  18. :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0"
  19. @change = "changeMode">
  20. <el-option
  21. v-for="item in modeOptions"
  22. :key="item.id"
  23. :label="item.name"
  24. :value="item.id"
  25. ></el-option>
  26. </el-select>
  27. <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
  28. :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id > 0"
  29. @change = "changeMode">>
  30. <el-option
  31. v-for="item in modeOptionsTwo"
  32. :key="item.id"
  33. :label="item.name"
  34. :value="item.id"
  35. ></el-option>
  36. </el-select>
  37. </el-form-item>
  38. </el-form>
  39. <div class="tabsBox">
  40. <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
  41. closable
  42. @tab-remove="removeTab"
  43. :before-leave="moreState" @tab-click="tabclickEvent">
  44. <el-tab-pane
  45. v-for="(item, index) in prescriptions"
  46. :key="index"
  47. :label="item.name"
  48. :name="item.name"
  49. >
  50. <!--<el-select style="width:50%;" v-model="item.med_type" placeholder="医疗类型" v-if="($store.getters.xt_user.org_id == 10028 || $store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10138)" @change="changevalue" >-->
  51. <!--<el-option-->
  52. <!--v-for="(item,index) in medical_care"-->
  53. <!--:key="index"-->
  54. <!--:label="item.label"-->
  55. <!--:value="item.value">-->
  56. <!--</el-option>-->
  57. <!--</el-select>-->
  58. <el-select v-if="org_id != 10206" style="width:50%;" v-model="item.med_type" placeholder="医疗类型"
  59. @change="changevalue">
  60. <el-option
  61. v-for="(item,index) in register"
  62. :key="index"
  63. :label="item.label"
  64. :value="item.value">
  65. </el-option>
  66. </el-select>
  67. <!-- //针对海拉尔普爱肾病医院-->
  68. <el-select v-if="org_id == 10206" style="width:50%;" v-model="item.med_type" placeholder="医疗类型"
  69. @change="changevalue">
  70. <el-option
  71. v-for="(item,index) in register10206"
  72. :key="index"
  73. :label="item.label"
  74. :value="item.value">
  75. </el-option>
  76. </el-select>
  77. </el-tab-pane>
  78. <el-tab-pane name="more" closable><span slot="label"><i
  79. class="el-icon-plus"
  80. @click="addTab"></i></span>
  81. </el-tab-pane>
  82. <!--<prescription-table ref="prescription_tables"-->
  83. <!--:prescription="curPrescriptions"-->
  84. <!--:preDrugs="preDrugs"-->
  85. <!--:activeType="customTabIndex"></prescription-table>-->
  86. <prescription-template-table ref="prescription_tables"
  87. :prescription="curPrescriptions"
  88. :preDrugs="preDrugs"
  89. :activeType="customTabIndex"></prescription-template-table>
  90. </el-tabs>
  91. </div>
  92. </div>
  93. <div class='centerRight'>
  94. <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab"
  95. :before-leave='beforeLeave'>
  96. <el-tab-pane label="药品" :name="1">
  97. </el-tab-pane>
  98. <el-tab-pane label="项目" :name="2">
  99. </el-tab-pane>
  100. <div style="height:100%;" v-show="showOne">
  101. <el-tabs class="rightTabs" v-model="drug_activeName">
  102. <el-tab-pane label="药品列表" name="1">
  103. <div style="margin-bottom:5px;display:flex;">
  104. <el-input style="width:50%;" @input="searchAction"
  105. @keyup.enter.native='searchAction'
  106. v-model.trim="search_keyword"
  107. placeholder="请输入药品名字"></el-input>
  108. <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder=""
  109. @change="changeKind">
  110. <el-option
  111. label="全部"
  112. value="0">
  113. </el-option>
  114. <el-option
  115. v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
  116. :key="index"
  117. :label="item.name"
  118. :value="item.id">
  119. </el-option>
  120. </el-select>
  121. </div>
  122. <div style="width: 100%;flex:1;overflow: hidden;" ref="rightTable">
  123. <el-table ref="multipleTable"
  124. :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
  125. :data="drugs" border @select='selectDrugs'
  126. :row-style="{ color: '#303133' }"
  127. @select-all="changeAllGoodInfoTableData"
  128. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  129. highlight-current-row>
  130. <el-table-column type="selection" width="40"
  131. align="center"></el-table-column>
  132. <el-table-column label="名称" v-if="org_id == 10206 || org_id == 0">
  133. <template slot-scope="scope">{{ scope.row.drug_name }}{{scope.row.number?"("+scope.row.number+")":""}}</template>
  134. </el-table-column>
  135. <el-table-column label="名称" v-if="org_id != 10206 && org_id != 0">
  136. <template slot-scope="scope">{{ scope.row.drug_name }}</template>
  137. </el-table-column>
  138. <el-table-column label="规格" width="60" v-if="org_id != 10206 && org_id != 0">
  139. <template slot-scope="scope">
  140. <span
  141. v-if="scope.row.min_unit != scope.row.dose_unit">{{ scope.row.dose }}{{ scope.row.dose_unit }}&nbsp;* &nbsp;</span>
  142. {{ scope.row.min_number }}{{ scope.row.min_unit }}/{{ scope.row.max_unit }}
  143. </template>
  144. </el-table-column>
  145. <el-table-column label="库存" width="60" v-if="org_id == 10206" >
  146. <template slot-scope="scope">{{ scope.row.zuobiao_stock_num }}</template>
  147. </el-table-column>
  148. <el-table-column label="规格" width="60" v-if="org_id == 10206 || org_id == 0">
  149. <template slot-scope="scope">
  150. <span>{{scope.row.drug_spec}}</span>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="单价" width="40">
  154. <template slot-scope="scope">{{ scope.row.retail_price }}</template>
  155. </el-table-column>
  156. </el-table>
  157. </div>
  158. </el-tab-pane>
  159. </el-tabs>
  160. </div>
  161. <div style="height:100%;" v-show="showTwo">
  162. <div style="height:100%;" v-show="showTwo">
  163. <el-tabs class="rightTabs" v-model="activeName">
  164. <el-tab-pane label="项目列表" name="1">
  165. <div style="margin-bottom:5px;">
  166. <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
  167. <el-input style="width:50%;" @input="searchProjectAction"
  168. @keyup.enter.native='searchProjectAction'
  169. v-model.trim="search_project_keyword"
  170. placeholder="请输入项目名称"></el-input>
  171. <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
  172. @change="changeClass">
  173. <el-option
  174. label="全部"
  175. value="0">
  176. </el-option>
  177. <el-option
  178. v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
  179. :key="index"
  180. :label="item.name"
  181. :value="item.id">
  182. </el-option>
  183. </el-select>
  184. </div>
  185. <div style="width: 100%;flex:1;overflow-y: auto;">
  186. <el-table ref="tables"
  187. :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
  188. :data="tabProject" border @select='selectChange'
  189. :row-style="{ color: '#303133' }"
  190. @select-all="changeAllGoodInfoTableDataTwo"
  191. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  192. highlight-current-row>
  193. <el-table-column type="selection" width="40"
  194. align="center"></el-table-column>
  195. <el-table-column prop="name" label="名称" v-if="org_id != 10206 && org_id != 0">
  196. <template slot-scope="scope">{{ scope.row.project_name }}</template>
  197. </el-table-column>
  198. <el-table-column prop="name" label="名称" v-if="org_id == 10206 || org_id == 0">
  199. <template slot-scope="scope">{{ scope.row.project_name }}{{scope.row.number?"("+scope.row.number+")":""}}</template>
  200. </el-table-column>
  201. <el-table-column label="库存" width="60" v-if="org_id == 10206" >
  202. <template slot-scope="scope">{{ scope.row.type == 3?scope.row.zuobiao_stock_num :""}}</template>
  203. </el-table-column>
  204. <el-table-column label="规格" width="60">
  205. <template slot-scope="scope">{{ scope.row.single_dose }}</template>
  206. </el-table-column>
  207. <el-table-column label="单价" width="40">
  208. <template slot-scope="scope">{{ scope.row.price }}</template>
  209. </el-table-column>
  210. </el-table>
  211. </div>
  212. </el-tab-pane>
  213. <el-tab-pane label="项目组套" name="2">
  214. <div style="width: 100%;flex:1;overflow-y: auto;">
  215. <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
  216. :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
  217. :row-style="{ color: '#303133' }"
  218. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  219. highlight-current-row
  220. @select='selectTeam'>
  221. <el-table-column type="selection" width="40"
  222. align="center"></el-table-column>
  223. <el-table-column prop="name" label="名称">
  224. <template slot-scope="scope">{{scope.row.project_team}}</template>
  225. </el-table-column>
  226. </el-table>
  227. </div>
  228. </el-tab-pane>
  229. </el-tabs>
  230. </div>
  231. </div>
  232. </el-tabs>
  233. <template>
  234. <div class="comfirmBox">
  235. <el-button type="primary" style="width:100%;" @click="comfirm">确定添加</el-button>
  236. </div>
  237. </template>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. </template>
  243. <script>
  244. import { createdTemplate, delHisPrescriptionInfoTemplate, getPrescriptionTemplateInfo } from '@/api/his/his_config'
  245. import {
  246. createHisPrescription,
  247. delHisPrescription,
  248. editHisPrescription,
  249. getCallHisPrescription,
  250. getDayOrMonthHisPrescription,
  251. getInitData,
  252. getNextOrLastHisPrescription,
  253. getPatientInfo,
  254. getSchedulePatientList,
  255. getPresciptionTemplateDetail
  256. } from '@/api/his/his'
  257. import { getDictionaryDataConfig } from '@/utils/data'
  258. import prescriptionTable from './components/prescriptionTable'
  259. import {
  260. addProjectTeam,
  261. getAllProjectList,
  262. getAllProjectTeam,
  263. getHisProject,
  264. getPojectListById
  265. } from '@/api/project/project'
  266. import { uParseTime } from '@/utils/tools'
  267. import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
  268. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  269. import axios from 'axios'
  270. const moment = require('moment')
  271. export default {
  272. props: {
  273. patientInfo: Object,
  274. hisPatientInfo: Object,
  275. prescriptions: Array,
  276. record_date: String,
  277. search_keyword: '',
  278. month_prescriptions: Array,
  279. isloading: false,
  280. loading: false,
  281. other_sick: {
  282. type: Array,
  283. default: function() {
  284. return []
  285. }
  286. }
  287. },
  288. components: {
  289. PrescriptionTemplateTable,
  290. prescriptionTable,
  291. BreadCrumb
  292. },
  293. data() {
  294. return {
  295. org_id:this.$store.getters.xt_user.org_id,
  296. register10206: [
  297. { value: 1, label: '普通' },
  298. { value: 2, label: '急诊' },
  299. { value: 5, label: '第一类精神药品' },
  300. { value: 6, label: '第二类精神药品' },
  301. { value: 7, label: '放射药品' },
  302. { value: 8, label: '毒性药品' },
  303. { value: 9, label: '检查' },
  304. { value: 10, label: '检验' },
  305. { value: 12, label: '治疗' },
  306. { value: 99, label: '其他' },
  307. ],
  308. medical_care: [
  309. { value: 11, label: '普通门诊' },
  310. { value: 12, label: '家庭通道' },
  311. { value: 13, label: '门诊大病' },
  312. { value: 14, label: '重疾特药' },
  313. { value: 15, label: '门诊慢病' },
  314. { value: 16, label: '门诊特检' },
  315. { value: 17, label: '健康体检' },
  316. { value: 18, label: '预防接种' },
  317. { value: 19, label: '门诊输血' },
  318. { value: 91, label: '新冠肺炎门诊' }
  319. ],
  320. register: [
  321. { value: 11, label: '普通门诊' },
  322. // { value: 12, label: '门诊挂号' },
  323. // { value: 13, label: '急诊' },
  324. { value: 14, label: '门诊特殊病' }
  325. // { value: 15, label: '门诊统筹' },
  326. // { value: 16, label: '门诊慢性病' },
  327. // { value: 21, label: '普通住院' }
  328. ],
  329. crumbs: [
  330. { path: false, name: '门诊医生站' },
  331. { path: false, name: '处方模版' },
  332. { path: false, name: '模版详情' }
  333. ],
  334. tempForm: {
  335. name: '',
  336. mode_id: ''
  337. },
  338. modeOptions:{},
  339. modeOptionsTwo: {},
  340. start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
  341. end_time: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  342. isLastOrNextVisible: false,
  343. multipleTableHeight: '',
  344. register_type: 1,
  345. value: '0',
  346. search_project_keyword: '',
  347. drugs: [],
  348. allDrugs: [],
  349. advices_template: [],
  350. additions: [],
  351. editableTabsValueTwo: '处方1',
  352. editableTabsValue: '处方1',
  353. editableTabs: [{
  354. title: '处方1',
  355. name: '1'
  356. }],
  357. curDayPrescriptions: null,
  358. dayPrescriptions: [],
  359. currenet_inedx: 0,
  360. rightTab: 1,
  361. activeName: '1',
  362. drug_activeName: '1',
  363. curPrescriptions: null,
  364. drugTableData: [],
  365. preDrugs: [],
  366. curDrugs: [],
  367. doctorOptions: [],
  368. doctorValue: '',
  369. departmentOptions: [],
  370. departmentValue: '',
  371. total: 0,
  372. request_record_date: '',
  373. state2: '',
  374. customTabIndex: 1,
  375. options: [],
  376. tabProject: [],
  377. allProject: [],
  378. strids: '',
  379. showOne: true,
  380. showTwo: false,
  381. tableData: [],
  382. tabPrjectTeam: [],
  383. teamList: [],
  384. doctors: [],
  385. departMent: [],
  386. curStatus: 0,
  387. isShowDayPrescription: false,
  388. monthCustomTabIndex: 1,
  389. order_status: '',
  390. register_types: [
  391. { id: 1, name: '医保' },
  392. { id: 2, name: '自费' }
  393. ],
  394. pickerOptions: {
  395. disabledDate(time) {
  396. let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
  397. return time.getTime() > Date.now() || time.getTime() < threeMonths
  398. }
  399. },
  400. department: [],
  401. sick: [],
  402. diagnoses: [],
  403. diagnose: 1,
  404. state1: 1,
  405. curTotal: 0,
  406. prescription_id: 0,
  407. tempDrugs: [],
  408. dayorMonth: 'day',
  409. hisList: [],
  410. id:0,
  411. zuobiao_drug:[],
  412. zuobiao_project:[],
  413. }
  414. },
  415. methods: {
  416. getZuobiaoDrugStock(){
  417. if (this.org_id == 10206) {
  418. var that = this
  419. axios.get('http://127.0.0.1:9532' + '/nmg/coordinate/querystockdrug', {})
  420. .then(function(response) {
  421. if (response.data.state == 0) {
  422. that.$message.error(response.data.msg)
  423. that.loadingtwo = false
  424. return false
  425. } else {
  426. if (response.data.data.failed_code == -10) {
  427. that.$confirm(response.data.data.msg, '医保错误信息', {
  428. confirmButtonText: '确 定',
  429. type: 'warning'
  430. }).then(() => {
  431. }).catch(() => {
  432. })
  433. } else {
  434. that.zuobiao_drug = response.data.data.drug
  435. // console.log('坐标~~坐标')
  436. // console.log(that.zuobiao_drug)
  437. // console.log(response.data.data.drug)
  438. // console.log('坐标~~坐标')
  439. //
  440. // // that.zuobiao_project = response.data.data.project
  441. // //跟坐标数据进行匹配,如果bbx01相等的话则,替换库存数量
  442. // for (let i = 0; i < that.zuobiao_drug.length; i++) {
  443. // for (let b = 0; b < that.drugs.length; b++) {
  444. // if (that.zuobiao_drug[i].bby01 == that.drugs[b].bby01) {
  445. // that.drugs[b]['zuobiao_stock_num'] = that.zuobiao_drug[i].sysl
  446. // that.drugs[b].min_price = that.zuobiao_drug[i].lsj
  447. //
  448. // }
  449. //
  450. // }
  451. // }
  452. // console.log('坐标~~坐标')
  453. // console.log(that.drugs)
  454. // console.log('坐标~~坐标')
  455. }
  456. }
  457. })
  458. .catch(function(error) {
  459. })
  460. }
  461. },
  462. getZuobiaoGoodStock(){
  463. if(this.org_id == 10206){
  464. var that = this
  465. axios.get("http://127.0.0.1:9532" + '/nmg/coordinate/querystockgood', {
  466. })
  467. .then(function(response) {
  468. if (response.data.state == 0) {
  469. that.$message.error(response.data.msg)
  470. that.loadingtwo = false
  471. return false
  472. } else {
  473. if (response.data.data.failed_code == -10) {
  474. that.$confirm(response.data.data.msg, '医保错误信息', {
  475. confirmButtonText: '确 定',
  476. type: 'warning'
  477. }).then(() => {
  478. }).catch(() => {
  479. })
  480. } else {
  481. // that.zuobiao_drug = response.data.data.drug
  482. that.zuobiao_project = response.data.data.project
  483. }
  484. }
  485. })
  486. .catch(function(error) {
  487. })
  488. }
  489. },
  490. lili(){
  491. console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
  492. },
  493. save() {
  494. if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
  495. this.$message.error('请先开处方')
  496. return
  497. }
  498. if (this.tempForm.name.length <= 0) {
  499. this.$message.error('模版名称不能为空')
  500. return
  501. }
  502. if (this.tempForm.mode_id <= 0) {
  503. this.$message.error('透析模式不能为空')
  504. return
  505. }
  506. for (let i = 0; i < this.prescriptions.length; i++) {
  507. console.log(this.prescriptions[i].med_type)
  508. if (this.prescriptions[i].med_type == 0 || this.prescriptions[i].med_type == '') {
  509. this.$message.error('处方医疗类型不能为空')
  510. return
  511. }
  512. }
  513. if(this.org_id != 10206){
  514. for (let i = 0; i < this.prescriptions.length; i++) {
  515. for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
  516. if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].advices[b].drug.is_special_diseases != 1) {
  517. this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,不能开非特病类型的药')
  518. return
  519. }
  520. }
  521. for (let c = 0; c < this.prescriptions[i].project.length; c++) {
  522. if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 2 && this.prescriptions[i].project[c].project.disease_directory != 1) {
  523. this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,请开特病类型的项目')
  524. return
  525. }
  526. if (this.prescriptions[i].med_type == 14 && this.prescriptions[i].project[c].type == 3 && this.prescriptions[i].project[c].good_info.is_special_diseases != 1) {
  527. this.$message.error('处方' + (i + 1).toString() + '属于特病类型处方,请开特病类型的耗材')
  528. return
  529. }
  530. }
  531. }
  532. }
  533. let params = {
  534. name: this.tempForm.name,
  535. mode_id: this.tempForm.mode_id,
  536. patient_id: this.$route.query.patient_id,
  537. id:this.$route.query.id,
  538. }
  539. for (let i = 0; i < this.prescriptions.length; i++) {
  540. this.prescriptions[i].med_type = parseInt(this.prescriptions[i].med_type)
  541. if (this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0) {
  542. this.prescriptions[i]['type'] = 1
  543. }
  544. if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
  545. this.prescriptions[i]['type'] = 2
  546. }
  547. for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
  548. this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
  549. this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
  550. this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
  551. this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
  552. this.prescriptions[i].advices[b].groupno = parseInt(this.prescriptions[i].advices[b].groupno)
  553. this.prescriptions[i].advices[b].day_count = parseInt(this.prescriptions[i].advices[b].day_count)
  554. this.prescriptions[i].advices[b].frequency_type = parseInt(this.prescriptions[i].advices[b].frequency_type)
  555. this.prescriptions[i].advices[b].week_day = this.prescriptions[i].advices[b].week_day.toString()
  556. }
  557. for (let b = 0; b < this.prescriptions[i].project.length; b++) {
  558. this.prescriptions[i].project[b].price = this.prescriptions[i].project[b].price.toString()
  559. this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
  560. this.prescriptions[i].project[b].delivery_way = this.prescriptions[i].project[b].delivery_way.toString()
  561. this.prescriptions[i].project[b].day_count = parseInt(this.prescriptions[i].project[b].day_count)
  562. this.prescriptions[i].project[b].frequency_type = parseInt(this.prescriptions[i].project[b].frequency_type)
  563. this.prescriptions[i].project[b].week_day = this.prescriptions[i].project[b].week_day.toString()
  564. }
  565. }
  566. let data = {
  567. 'prescriptions': this.prescriptions
  568. }
  569. createdTemplate(params, data).then(response => {
  570. if (response.data.state == 1) {
  571. this.$message.success('保存成功')
  572. this.$emit('save',this.$route.query.patient_name)
  573. for (const mkey in this.modeOptions) {
  574. if (mkey == this.tempForm.mode_id) {
  575. delete this.modeOptions[mkey]
  576. }
  577. }
  578. this.$router.go(-1)
  579. } else {
  580. this.$message.error(response.data.msg)
  581. }
  582. })
  583. },
  584. changeClass(id) {
  585. this.tabProject = []
  586. if (id == 0) {
  587. this.tabProject = this.allProject
  588. } else {
  589. for (let i = 0; i < this.allProject.length; i++) {
  590. if (this.allProject[i].cost_classify == id) {
  591. this.tabProject.push(this.allProject[i])
  592. }
  593. }
  594. }
  595. },
  596. formatDecimal(num, decimal) {
  597. num = num.toString()
  598. let index = num.indexOf('.')
  599. if (index !== -1) {
  600. num = num.substring(0, decimal + index + 1)
  601. } else {
  602. num = num.substring(0)
  603. }
  604. return parseFloat(num).toFixed(decimal)
  605. },
  606. setValue(val) {
  607. this.prescriptions = []
  608. this.prescriptions = val
  609. this.$refs.next_or_last_prescription.close()
  610. var nowDate = new Date()
  611. var nowYear = nowDate.getFullYear()
  612. var nowMonth = nowDate.getMonth() + 1
  613. var nowDay = nowDate.getDate()
  614. var hours = nowDate.getHours()
  615. var min = nowDate.getMinutes()
  616. var nowTime =
  617. nowYear +
  618. '-' +
  619. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  620. '-' +
  621. (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
  622. ':' + (min < 10 ? '0' + min : min)
  623. for (let i = 0; i < this.prescriptions.length; i++) {
  624. this.prescriptions[i].name = '处方' + (i + 1)
  625. this.prescriptions[i]['pre_time'] = nowTime
  626. if (i == 0) {
  627. if (this.prescriptions[0].advices.length > 0 && this.prescriptions[0].project.length == 0) {
  628. this.customTabIndex = 1
  629. this.curStatus = 1
  630. this.rightTab = 1
  631. this.showOne = true
  632. this.showTwo = false
  633. }
  634. if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length > 0) {
  635. this.customTabIndex = 2
  636. this.curStatus = 2
  637. this.rightTab = 2
  638. this.showTwo = true
  639. this.showOne = false
  640. }
  641. }
  642. }
  643. this.curPrescriptions = this.prescriptions[0]
  644. this.request_record_date = this.record_date
  645. this.$emit('setData', this.prescriptions)
  646. },
  647. GetNextOrLastHisPrescription(params) {
  648. getNextOrLastHisPrescription(params).then(response => {
  649. if (response.data.state == 1) {
  650. if (this.dayorMonth == 'day') {
  651. this.$refs.next_or_last_prescription.show(response.data.data.prescriptions, this.patientInfo.name, this.patientInfo.id, this.prescriptions)
  652. this.request_record_date = uParseTime(response.data.data.prescriptions[0].record_date, '{y}-{m}-{d}')
  653. } else {
  654. this.$message.error('当前处于月结,无法使用上一方或下一方功能')
  655. }
  656. } else {
  657. this.$message.error(response.data.msg)
  658. }
  659. })
  660. },
  661. selectTemplate(selection, row) {
  662. this.tempDrugs = selection
  663. }, changeTemplateData(selection) {
  664. this.tempDrugs = selection
  665. },
  666. searchProjectAction() {
  667. if (this.search_project_keyword.length == 0) {
  668. this.tabProject = this.allProject
  669. } else {
  670. let arr = []
  671. for (let i = 0; i < this.tabProject.length; i++) {
  672. if (this.tabProject[i].project_name.indexOf(this.search_project_keyword) != -1 ||
  673. this.tabProject[i].first_letter.indexOf(this.search_project_keyword) !=-1) {
  674. arr = arr.concat(this.tabProject[i])
  675. }
  676. }
  677. this.tabProject = arr
  678. }
  679. },
  680. searchAction() {
  681. if (this.search_keyword.length == 0) {
  682. this.drugs = this.allDrugs
  683. } else {
  684. let arr = []
  685. for (let i = 0; i < this.drugs.length; i++) {
  686. if (this.drugs[i].drug_name.indexOf(this.search_keyword) != -1 ||
  687. this.drugs[i].wubi.indexOf(this.search_keyword) != -1 ||
  688. this.drugs[i].pinyin.indexOf(this.search_keyword) != -1 ||
  689. this.drugs[i].first_letter.indexOf(this.search_keyword) != -1) {
  690. arr = arr.concat(this.drugs[i])
  691. }
  692. }
  693. this.drugs = arr
  694. }
  695. },
  696. createFilter(queryString) {
  697. return (restaurant) => {
  698. return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
  699. }
  700. },
  701. querySearch2(queryString, cb) {
  702. var restaurants = this.other_sick
  703. restaurants.map(item => {
  704. item.value = item.name
  705. })
  706. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
  707. // 调用 callback 返回建议列表的数据
  708. cb(results)
  709. },
  710. changeKind(val) {
  711. this.drugs = []
  712. if (val == 0) {
  713. this.drugs = this.allDrugs
  714. } else {
  715. for (let i = 0; i < this.allDrugs.length; i++) {
  716. if (this.allDrugs[i].drug_type == val) {
  717. this.drugs.push(this.allDrugs[i])
  718. }
  719. }
  720. }
  721. },
  722. getDictionaryDataConfig(module, filed_name) {
  723. return getDictionaryDataConfig(module, filed_name)
  724. },
  725. getInitData() {
  726. getInitData().then(response => {
  727. if (response.data.state == 0) {
  728. this.$message.error(response.data.msg)
  729. return false
  730. } else {
  731. this.drugs = response.data.data.drugs
  732. if (this.org_id == 10206) {
  733. for (let i = 0; i < this.zuobiao_drug.length; i++) {
  734. for (let b = 0; b < this.drugs.length; b++) {
  735. if (this.zuobiao_drug[i].bby01 == this.drugs[b].bby01) {
  736. this.drugs[b]['zuobiao_stock_num'] = this.zuobiao_drug[i].sysl
  737. this.drugs[b].retail_price = this.zuobiao_drug[i].lsj
  738. }
  739. }
  740. }
  741. }
  742. this.allDrugs = response.data.data.drugs
  743. this.advices_template = response.data.data.advices_template
  744. this.doctors = response.data.data.doctors
  745. for (let i = 0; i < this.doctors.length; i++) {
  746. if (this.doctors[i].user_type == 1) {
  747. this.doctors.splice(i, 1)
  748. }
  749. }
  750. this.department = response.data.data.department
  751. this.sick = response.data.data.sick
  752. this.diagnoses = response.data.data.diagnose
  753. this.additions = response.data.data.additions
  754. }
  755. })
  756. },
  757. tabclickEvent(val) {
  758. for (let i = 0; i < this.prescriptions.length; i++) {
  759. if (this.prescriptions[i].name == val.name) {
  760. this.prescription_id = this.prescriptions[i].id
  761. this.$emit('event1', this.prescription_id)
  762. this.curPrescriptions = this.prescriptions[i]
  763. this.teamList = []
  764. this.curDrugs = []
  765. this.$refs.multipleTable.clearSelection()
  766. this.$refs.tables.clearSelection()
  767. //用来区分处方属于项目还是药品
  768. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  769. this.customTabIndex = 1
  770. this.curStatus = 1
  771. this.rightTab = 1
  772. this.showOne = true
  773. this.showTwo = false
  774. }
  775. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
  776. this.customTabIndex = 2
  777. this.curStatus = 2
  778. this.rightTab = 2
  779. this.showTwo = true
  780. this.showOne = false
  781. }
  782. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
  783. this.customTabIndex = this.rightTab
  784. this.curStatus = 0
  785. }
  786. }
  787. }
  788. if (this.curPrescriptions.order_status == 0) {
  789. this.order_status = ''
  790. }
  791. if (this.curPrescriptions.order_status == 1) {
  792. this.order_status = '未收费'
  793. }
  794. if (this.curPrescriptions.order_status == 2) {
  795. this.order_status = '已结算'
  796. }
  797. if (this.curPrescriptions.order_status == 3) {
  798. this.order_status = '已退费'
  799. }
  800. },
  801. clearData() {
  802. this.curPrescriptions = []
  803. this.curStatus = 0
  804. this.curDrugs = []
  805. this.preDrugs = []
  806. this.teamList = []
  807. },
  808. setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data) {
  809. for (let i = 0; i < doctors.length; i++) {
  810. if (doctors[i].user_type == 1) {
  811. doctors.splice(i, 1)
  812. }
  813. }
  814. this.curMonthPrescriptions = {}
  815. this.curPrescriptions = {}
  816. this.prescription_id = data[0].id
  817. this.editableTabsValue = '处方1'
  818. this.dayorMonth = 'day'
  819. this.$emit('event1', this.prescription_id)
  820. this.curStatus = 0
  821. this.curPrescriptions = {}
  822. this.curMonthPrescriptions = {}
  823. if (month_data && month_data.length > 0) {
  824. this.curMonthPrescriptions = month_data[0]
  825. } else {
  826. this.curMonthPrescriptions = {}
  827. }
  828. if (data && data.length > 0) {
  829. this.curPrescriptions = data[0]
  830. } else {
  831. this.curPrescriptions = {}
  832. }
  833. this.diagnose = info.diagnosis
  834. if (this.diagnose == 0) {
  835. for (let i = 0; i < this.diagnoses.length; i++) {
  836. this.diagnose = this.diagnoses[0].id
  837. }
  838. }
  839. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  840. this.curStatus = 1
  841. this.customTabIndex = 1
  842. this.rightTab = 1
  843. this.showOne = true
  844. this.showTwo = false
  845. }
  846. if (this.curPrescriptions.project.length > 0 && this.curPrescriptions.advices.length == 0) {
  847. this.curStatus = 2
  848. this.customTabIndex = 2
  849. this.rightTab = 2
  850. this.showOne = false
  851. this.showTwo = true
  852. }
  853. this.state1 = info.sick_type
  854. if (this.state1 == 0) {
  855. this.state1 = ''
  856. for (let i = 0; i < this.sick.length; i++) {
  857. this.state1 = this.sick[0].id
  858. }
  859. }
  860. this.state2 = info.sick_history
  861. if (this.state2 == 0) {
  862. this.state2 = ''
  863. }
  864. if (info.prescription_status == 0) {
  865. this.order_status = ''
  866. }
  867. if (this.curPrescriptions.order_status == 1) {
  868. this.order_status = '未收费'
  869. }
  870. if (this.curPrescriptions.order_status == 2) {
  871. this.order_status = '已结算'
  872. }
  873. if (this.curPrescriptions.order_status == 3) {
  874. this.order_status = '已退费'
  875. }
  876. if (info.id > 0) {
  877. this.doctorValue = info.doctor_id
  878. this.departmentValue = info.departments
  879. } else {
  880. if (hisPatientInfo.doctor != 0 && hisPatientInfo.department != 0) {
  881. this.doctorValue = hisPatientInfo.doctor
  882. this.departmentValue = hisPatientInfo.department
  883. } else {
  884. if (admin_info.user_type == 2 || admin_info.user_type == 1) {
  885. this.doctorValue = admin_info.admin_user_id
  886. if (admin_info.department_id == 0) {
  887. if (this.department.length > 0) {
  888. if (department && department.length > 0) {
  889. this.departmentValue = department[0].id
  890. } else {
  891. this.departmentValue = ''
  892. }
  893. } else {
  894. this.departmentValue = ''
  895. }
  896. } else {
  897. this.departmentValue = admin_info.department_id
  898. }
  899. } else {
  900. this.doctorValue = doctors[0].admin_user_id
  901. }
  902. if (this.doctorValue == 0) {
  903. this.doctorValue = ''
  904. }
  905. }
  906. }
  907. if (info.register_type == 0) {
  908. for (let i = 0; i < this.register.length; i++) {
  909. this.register_type = this.register[0].value
  910. }
  911. } else {
  912. this.register_type = info.register_type
  913. }
  914. },
  915. moreState(tab, event) {
  916. if (tab == 'more') {
  917. return false
  918. }
  919. }, open_three() {
  920. this.$refs.saveTemplate.show(this.prescriptions)
  921. }, open_two() {
  922. if (this.dayorMonth == 'day') {
  923. if (this.patientInfo == null || this.patientInfo.id == 0) {
  924. this.$message.error('请选择患者')
  925. return
  926. }
  927. let params = {
  928. end_time: this.record_date,
  929. start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
  930. patient_id: this.patientInfo.id,
  931. p_type: 2
  932. }
  933. getCallHisPrescription(params).then(response => {
  934. if (response.data.state == 1) {
  935. this.$refs.call_prescription.show(this.patientInfo.name, this.patientInfo.id, params.end_time, params.start_time, this.prescriptions, response.data.data.prescriptions)
  936. } else {
  937. this.$message.error(response.data.msg)
  938. }
  939. })
  940. } else {
  941. this.$message.error('当前属于月结状态,无法试用处方调用')
  942. }
  943. },
  944. open(index, isLoading) {
  945. if (this.dayorMonth == 'day') {
  946. if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
  947. this.$message.error('请先开处方')
  948. return
  949. }
  950. }
  951. if (this.dayorMonth == 'day') {
  952. if (this.doctorValue.length <= 0) {
  953. this.$message.error('医生不能为空')
  954. return
  955. }
  956. if (this.departmentValue.length <= 0) {
  957. this.$message.error('科室不能为空')
  958. return
  959. }
  960. if (this.state1 <= 0) {
  961. this.$message.error('疾病类型不能为空')
  962. return
  963. }
  964. if (index == 1) {
  965. let params = {
  966. p_type: 2,
  967. patient_id: this.patientInfo.id,
  968. diagnose: this.diagnose,
  969. sick_type: this.state1,
  970. sick_history: this.state2,
  971. doctor: this.doctorValue,
  972. department: this.departmentValue,
  973. record_date: this.record_date,
  974. his_patient_id: this.hisPatientInfo.id,
  975. reg_type: this.register_type,
  976. }
  977. for (let i = 0; i < this.prescriptions.length; i++) {
  978. if (this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0) {
  979. this.prescriptions[i]['type'] = 1
  980. }
  981. if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
  982. this.prescriptions[i]['type'] = 2
  983. }
  984. for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
  985. this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
  986. this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
  987. this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
  988. this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
  989. this.prescriptions[i].advices[b].day_count = parseInt(this.prescriptions[i].advices[b].day_count)
  990. this.prescriptions[i].advices[b].frequency_type = parseInt(this.prescriptions[i].advices[b].frequency_type)
  991. this.prescriptions[i].advices[b].week_day = this.prescriptions[i].advices[b].week_day.toString()
  992. }
  993. for (let b = 0; b < this.prescriptions[i].project.length; b++) {
  994. this.prescriptions[i].project[b].price = this.prescriptions[i].project[b].price.toString()
  995. this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
  996. this.prescriptions[i].project[b].delivery_way = this.prescriptions[i].project[b].delivery_way.toString()
  997. this.prescriptions[i].project[b].day_count = parseInt(this.prescriptions[i].project[b].day_count)
  998. this.prescriptions[i].project[b].frequency_type = parseInt(this.prescriptions[i].project[b].frequency_type)
  999. this.prescriptions[i].project[b].week_day = this.prescriptions[i].project[b].week_day.toString()
  1000. }
  1001. for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
  1002. this.prescriptions[i].addition[b].id = parseInt(this.prescriptions[i].addition[b].id)
  1003. this.prescriptions[i].addition[b].item_id = parseInt(this.prescriptions[i].addition[b].item_id)
  1004. this.prescriptions[i].addition[b].price = this.prescriptions[i].addition[b].price.toString()
  1005. this.prescriptions[i].addition[b].count = this.prescriptions[i].addition[b].count.toString()
  1006. }
  1007. }
  1008. let data = {
  1009. 'prescriptions': this.prescriptions
  1010. }
  1011. isLoading = true
  1012. createHisPrescription(data, params).then(response => {
  1013. if (response.data.state == 1) {
  1014. this.$emit('change', this.patientInfo.id)
  1015. this.$message.success('保存成功')
  1016. }
  1017. })
  1018. } else if (index == 2) {
  1019. this.$router.push('/outpatientDoctorStation/print')
  1020. } else if (index == 4) {
  1021. } else if (index == 5) {
  1022. this.$refs.saveTemplate.show()
  1023. }
  1024. } else if (this.dayorMonth == 'month') {
  1025. if (this.isShowDayPrescription) {
  1026. // if (this.curDayPrescriptions.order_status == 2) {
  1027. // this.$message.error('当前处方已经结算,无法保存')
  1028. // return
  1029. // }
  1030. if (this.doctorValue.length <= 0) {
  1031. this.$message.error('医生不能为空')
  1032. return
  1033. }
  1034. if (this.departmentValue.length <= 0) {
  1035. this.$message.error('科室不能为空')
  1036. return
  1037. }
  1038. if (index == 1) {
  1039. let params = {
  1040. patient_id: this.patientInfo.id,
  1041. diagnose: this.diagnose,
  1042. sick_type: this.state1,
  1043. sick_history: this.state2,
  1044. doctor: this.doctorValue,
  1045. department: this.departmentValue,
  1046. record_date: this.end_time,
  1047. his_patient_id: this.hisPatientInfo.id,
  1048. reg_type: this.register_type,
  1049. p_type: 2
  1050. }
  1051. var month_prescriptions = this.deepClone(this.month_prescriptions)
  1052. for (let i = 0; i < month_prescriptions.length; i++) {
  1053. if (month_prescriptions[i].advices.length > 0 && month_prescriptions[i].project.length == 0) {
  1054. month_prescriptions[i]['type'] = 1
  1055. }
  1056. if (month_prescriptions[i].advices.length == 0 && month_prescriptions[i].project.length > 0) {
  1057. month_prescriptions[i]['type'] = 2
  1058. }
  1059. for (let b = 0; b < month_prescriptions[i].advices.length; b++) {
  1060. month_prescriptions[i].advices[b].single_dose = month_prescriptions[i].advices[b].single_dose.toString()
  1061. month_prescriptions[i].advices[b].prescribing_number = month_prescriptions[i].advices[b].prescribing_number.toString()
  1062. month_prescriptions[i].advices[b].retail_price = month_prescriptions[i].advices[b].retail_price.toString()
  1063. month_prescriptions[i].advices[b].day = parseInt(month_prescriptions[i].advices[b].day)
  1064. }
  1065. for (let b = 0; b < month_prescriptions[i].project.length; b++) {
  1066. console.log('~~~~~~~')
  1067. month_prescriptions[i].project[b].price = month_prescriptions[i].project[b].price.toString()
  1068. month_prescriptions[i].project[b].total = month_prescriptions[i].project[b].total.toString()
  1069. month_prescriptions[i].project[b].delivery_way = month_prescriptions[i].project[b].delivery_way.toString()
  1070. }
  1071. for (let b = 0; b < month_prescriptions[i].addition.length; b++) {
  1072. month_prescriptions[i].addition[b].id = parseInt(month_prescriptions[i].addition[b].id)
  1073. month_prescriptions[i].addition[b].item_id = parseInt(month_prescriptions[i].addition[b].item_id)
  1074. month_prescriptions[i].addition[b].price = month_prescriptions[i].addition[b].price.toString()
  1075. month_prescriptions[i].addition[b].count = month_prescriptions[i].addition[b].count.toString()
  1076. }
  1077. }
  1078. let data = {
  1079. 'prescriptions': month_prescriptions
  1080. }
  1081. editHisPrescription(data, params).then(response => {
  1082. if (response.data.state == 1) {
  1083. this.month_prescriptions = month_prescriptions
  1084. this.$message.success('编辑成功')
  1085. }
  1086. })
  1087. }
  1088. }
  1089. }
  1090. },
  1091. addTab(targetName) {
  1092. // if (this.curPrescriptions.order_status == 2) {
  1093. // this.$message.error('该处方已经结算或者退费,无法继续添加处方')
  1094. // return
  1095. // }
  1096. // if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
  1097. // this.$message.error('当前处方无数据,新增数据后才能新增处方')
  1098. // return
  1099. // }
  1100. if (this.prescriptions.length == 0){
  1101. this.tabIndex = 1
  1102. }else{
  1103. var str = this.prescriptions[this.prescriptions.length - 1].name
  1104. var reg =/[\u4e00-\u9fa5]/g;
  1105. this.tabIndex = parseInt(str.replace(reg, ""))
  1106. ++this.tabIndex
  1107. }
  1108. let newTabName = '处方' + this.tabIndex
  1109. var nowDate = new Date()
  1110. var nowYear = nowDate.getFullYear()
  1111. var nowMonth = nowDate.getMonth() + 1
  1112. var nowDay = nowDate.getDate()
  1113. var hours = nowDate.getHours()
  1114. var min = nowDate.getMinutes()
  1115. var nowTime =
  1116. nowYear +
  1117. '-' +
  1118. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  1119. '-' +
  1120. (nowDay < 10 ? '0' + nowDay : nowDay) + ' ' + (hours < 10 ? '0' + hours : hours) +
  1121. ':' + (min < 10 ? '0' + min : min)
  1122. let obj = {
  1123. id: 0,
  1124. name: newTabName,
  1125. order_status: 0,
  1126. advices: [],
  1127. project: [],
  1128. addition: [],
  1129. pre_time: nowTime,
  1130. // pre_time: nowTime
  1131. }
  1132. if(this.org_id == 10206) {
  1133. obj.med_type = 12
  1134. }else{
  1135. obj.med_type = 14
  1136. }
  1137. this.prescriptions.push(obj)
  1138. this.editableTabsValue = newTabName
  1139. this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
  1140. this.curStatus = 0
  1141. if (this.curPrescriptions.order_status == 0) {
  1142. this.order_status = '未收费'
  1143. }
  1144. if (this.curPrescriptions.order_status == 1) {
  1145. this.order_status = '未收费'
  1146. }
  1147. if (this.curPrescriptions.order_status == 2) {
  1148. this.order_status = '已结算'
  1149. }
  1150. if (this.curPrescriptions.order_status == 3) {
  1151. this.order_status = '已退费'
  1152. }
  1153. },
  1154. removeTab(targetName) {
  1155. this.$confirm('处方删除后不可恢复,是否确认删除', '删除', {
  1156. confirmButtonText: '确 定',
  1157. cancelButtonText: '取 消',
  1158. type: 'warning'
  1159. }).then(() => {
  1160. let id = 0
  1161. for (let i = 0; i < this.prescriptions.length; i++) {
  1162. if (this.prescriptions[i].name == targetName) {
  1163. id = this.prescriptions[i].id
  1164. }
  1165. }
  1166. if (id == 0) {
  1167. let tabs = this.prescriptions
  1168. let activeName = this.editableTabsValue
  1169. if (activeName === targetName) {
  1170. tabs.forEach((tab, index) => {
  1171. if (tab.name === targetName) {
  1172. let nextTab = tabs[index + 1] || tabs[index - 1]
  1173. if (nextTab) {
  1174. activeName = nextTab.name
  1175. }
  1176. }
  1177. })
  1178. }
  1179. this.editableTabsValue = activeName
  1180. this.prescriptions = tabs.filter(tab => tab.name !== targetName)
  1181. for (let i = 0; i < this.prescriptions.length; i++) {
  1182. if (activeName == this.prescriptions[i].name) {
  1183. this.curPrescriptions = this.prescriptions[i]
  1184. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  1185. this.curStatus = 1
  1186. }
  1187. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
  1188. this.curStatus = 2
  1189. }
  1190. }
  1191. }
  1192. if (this.prescriptions.length == 0) {
  1193. this.curPrescriptions = []
  1194. this.curStatus = 0
  1195. }
  1196. } else {
  1197. let params = {
  1198. 'id': id
  1199. }
  1200. delHisPrescriptionInfoTemplate(params).then(response => {
  1201. if (response.data.state == 1) {
  1202. this.$message.success('删除成功')
  1203. let tabs = this.prescriptions
  1204. let activeName = this.editableTabsValue
  1205. if (activeName === targetName) {
  1206. tabs.forEach((tab, index) => {
  1207. if (tab.name === targetName) {
  1208. let nextTab = tabs[index + 1] || tabs[index - 1]
  1209. if (nextTab) {
  1210. activeName = nextTab.name
  1211. }
  1212. }
  1213. })
  1214. }
  1215. this.editableTabsValue = activeName
  1216. this.prescriptions = tabs.filter(tab => tab.name !== targetName)
  1217. for (let i = 0; i < this.prescriptions.length; i++) {
  1218. if (activeName == this.prescriptions[i].name) {
  1219. this.curPrescriptions = this.prescriptions[i]
  1220. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  1221. this.curStatus = 1
  1222. }
  1223. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
  1224. this.curStatus = 2
  1225. }
  1226. }
  1227. }
  1228. if (this.prescriptions.length == 0) {
  1229. this.curPrescriptions = []
  1230. this.curStatus = 0
  1231. }
  1232. } else {
  1233. this.$message.success(response.data.msg)
  1234. }
  1235. })
  1236. }
  1237. }).catch(() => {
  1238. })
  1239. },
  1240. beforeLeave(activeName, oldActiveName) {
  1241. let index = activeName
  1242. if (index == 1) {
  1243. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
  1244. return false
  1245. }
  1246. } else {
  1247. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  1248. return false
  1249. }
  1250. }
  1251. },
  1252. clickTab(tab) {
  1253. let index = parseInt(tab.name)
  1254. if (index == 1) {
  1255. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
  1256. this.$message.error('当前处方为项目,无法切换为药品,需要新开处方')
  1257. return
  1258. }
  1259. } else {
  1260. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  1261. this.$message.error('当前处方为药品,无法切换为项目,需要新开处方')
  1262. return
  1263. }
  1264. }
  1265. if (index == 1) {
  1266. this.teamList = []
  1267. this.$refs.tables.clearSelection()
  1268. this.showOne = true
  1269. this.showTwo = false
  1270. this.$nextTick(() => {
  1271. console.log("lilili1111111111111111111111111111111111111111111",this.prescriptions[this.prescriptions.length - 1])
  1272. this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
  1273. })
  1274. this.customTabIndex = 1
  1275. }
  1276. if (index == 2) {
  1277. this.curDrugs = []
  1278. this.$refs.multipleTable.clearSelection()
  1279. this.showTwo = true
  1280. this.showOne = false
  1281. this.$nextTick(() => {
  1282. console.log("lilili1111111111111111111111111111111111111111111",this.prescriptions[this.prescriptions.length - 1])
  1283. this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
  1284. })
  1285. this.customTabIndex = 2
  1286. }
  1287. this.rightTab = index
  1288. //用来区分处方属于项目还是药品
  1289. if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  1290. this.customTabIndex = 1
  1291. this.curStatus = 1
  1292. }
  1293. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
  1294. this.customTabIndex = 2
  1295. this.curStatus = 2
  1296. }
  1297. if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
  1298. // this.customTabIndex = this.rightTab
  1299. this.customTabIndex = index
  1300. this.curStatus = 0
  1301. }
  1302. }, changeAllGoodInfoTableData: function(selection) {
  1303. this.curDrugs = selection
  1304. }, addCharges() {
  1305. this.$refs.additionalCharges.show()
  1306. },
  1307. selectDrugs(selection, row) {
  1308. if(this.org_id == 10206){
  1309. if (row.zuobiao_stock_num <= 0) {
  1310. if (selection) {
  1311. selection.forEach(row => {
  1312. if (row.zuobiao_stock_num <= 0) {
  1313. this.$refs.multipleTable.toggleRowSelection(row)
  1314. }
  1315. })
  1316. } else {
  1317. this.$refs.multipleTable.clearSelection()
  1318. }
  1319. this.$message.error(row.drug_name + '库存不足')
  1320. return
  1321. }else{
  1322. this.curDrugs = selection
  1323. }
  1324. }else{
  1325. this.curDrugs = selection
  1326. }
  1327. },
  1328. comfirm() {
  1329. // if (this.curPrescriptions.order_status == 2) {
  1330. // this.$message.error('该处方已经结算,无法继续添加药品或者项目')
  1331. // this.teamList = []
  1332. // this.curDrugs = []
  1333. // this.tempDrugs = []
  1334. // this.$refs.tables.clearSelection()
  1335. // this.$refs.multipleTableTwo.clearSelection()
  1336. // this.$refs.multipleTable.clearSelection()
  1337. // return
  1338. // }
  1339. // if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
  1340. // if (this.$store.getters.xt_user.org_id == 10138) {
  1341. // for (let i = 0; i < this.curDrugs.length; i++) {
  1342. // if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
  1343. // this.$message.error('该处方属于特病类型处方,开非特病类型的药')
  1344. // return
  1345. // }
  1346. // }
  1347. // }
  1348. // }
  1349. // if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
  1350. // if (this.$store.getters.xt_user.org_id == 10138) {
  1351. // for (let i = 0; i < this.curDrugs.length; i++) {
  1352. // if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
  1353. // this.$message.error('该处方属于特病类型处方,开非特病类型的药')
  1354. // return
  1355. // }
  1356. // }
  1357. // }
  1358. // }
  1359. if (this.curDrugs.length > 0) {
  1360. for (let i = 0; i < this.curDrugs.length; i++) {
  1361. if(this.$store.getters.xt_user.org.id != 10206) {
  1362. if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
  1363. this.$message.error('该处方属于特病类型处方,开非特病类型的药')
  1364. return
  1365. }
  1366. }
  1367. }
  1368. }
  1369. if (this.teamList.length > 0) {
  1370. for (let i = 0; i < this.teamList.length; i++) {
  1371. if(this.$store.getters.xt_user.org.id != 10206) {
  1372. if (this.curPrescriptions.med_type == 14 && this.teamList[i].is_special_diseases != 1) {
  1373. setTimeout(() => {
  1374. this.$message.error('该处方属于特病类型处方,请开特病类型的项目')
  1375. }, 100)
  1376. // return
  1377. }
  1378. }
  1379. }
  1380. let arr = this.teamList
  1381. let newArr = []
  1382. arr.map(item => {
  1383. if (this.curPrescriptions.med_type != 14) {
  1384. newArr.push(item)
  1385. }
  1386. if (this.curPrescriptions.med_type == 14 && item.is_special_diseases == 1) {
  1387. newArr.push(item)
  1388. }
  1389. })
  1390. this.teamList = newArr
  1391. }
  1392. if (this.curDrugs.length == 0) {
  1393. for (let i = 0; i < this.curDrugs.length; i++) {
  1394. if(this.$store.getters.xt_user.org.id != 10206) {
  1395. if (this.curPrescriptions.med_type == 14 && this.curDrugs[i].is_special_diseases != 1) {
  1396. this.$message.error('该处方属于特病类型处方,开非特病类型的药')
  1397. return
  1398. }
  1399. }
  1400. }
  1401. }
  1402. if (this.curStatus == 1 && this.rightTab == 2) {
  1403. this.$message.error('该处方是药品,无法添加项目')
  1404. this.teamList = []
  1405. this.$refs.tables.clearSelection()
  1406. return
  1407. }
  1408. if (this.curStatus == 2 && this.rightTab == 1) {
  1409. this.$message.error('该处方是项目,无法添加药品')
  1410. this.curDrugs = []
  1411. this.tempDrugs = []
  1412. this.$refs.multipleTable.clearSelection()
  1413. this.$refs.multipleTableTwo.clearSelection()
  1414. return
  1415. }
  1416. for (let i = 0; i < this.teamList.length; i++) {
  1417. for (let a = 0; a < this.curPrescriptions.project.length; a++) {
  1418. if (this.teamList[i].id == this.curPrescriptions.project[a].project_id) {
  1419. this.$message.error('当前处方存在相同的药品,无法添加相同的项目')
  1420. return
  1421. }
  1422. }
  1423. }
  1424. for (let i = 0; i < this.curDrugs.length; i++) {
  1425. for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
  1426. if (this.curDrugs[i].id == this.curPrescriptions.advices[a].id) {
  1427. this.$message.error('当前处方存在相同的药品,无法添加相同的药品')
  1428. return
  1429. }
  1430. }
  1431. }
  1432. let templateDrugs = []
  1433. for (let i = 0; i < this.tempDrugs.length; i++) {
  1434. for (let a = 0; a < this.tempDrugs[i].advices.length; a++) {
  1435. templateDrugs.push(this.tempDrugs[i].advices[a])
  1436. }
  1437. }
  1438. // for (let i = 0; i < templateDrugs.length; i++) {
  1439. // for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
  1440. // if (this.templateDrugs[i].drug_id == this.curPrescriptions.advices[i].id) {
  1441. // this.$message.error('改处方存在相同的药品,无法添加相同的药品')
  1442. // return
  1443. //
  1444. // }
  1445. // }
  1446. // }
  1447. for (let i = 0; i < this.prescriptions.length; i++) {
  1448. if (this.prescriptions[i].name == this.editableTabsValue) {
  1449. var temp = this.deepClone(this.curDrugs)
  1450. var temp2 = this.deepClone(this.teamList)
  1451. var temp3 = this.deepClone(templateDrugs)
  1452. if (temp3.length > 0) {
  1453. for (let b = 0; b < temp3.length; b++) {
  1454. let obj = {
  1455. advice_id: 0,
  1456. id: temp3[b].id,
  1457. drug_name: temp3[b].advice_name,
  1458. single_dose: temp3[b].single_dose,
  1459. delivery_way: temp3[b].delivery_way,
  1460. execution_frequency: temp3[b].execution_frequency,
  1461. retail_price: temp3[b].drug.retail_price.toString(),
  1462. remark: '',
  1463. day: 1,
  1464. prescribing_number: temp3[b].prescribing_number,
  1465. single_dose_unit: temp3[b].drug.drug_dose_unit,
  1466. prescribing_number_unit: temp3[b].drug.max_unit,
  1467. medical_insurance_number: temp3[b].drug.medical_insurance_number
  1468. }
  1469. if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
  1470. obj.prescribing_number = 1
  1471. }
  1472. this.prescriptions[i].advices.push(obj)
  1473. }
  1474. this.curStatus = 1
  1475. }
  1476. let index = 0
  1477. if (this.prescriptions[i].advices.length > 0) {
  1478. index = this.prescriptions[i].advices.length
  1479. }
  1480. if (temp.length > 0) {
  1481. for (let b = 0; b < temp.length; b++) {
  1482. let temp_index = b + 1
  1483. let obj = {
  1484. advice_id: 0,
  1485. id: temp[b].id,
  1486. drug_name: temp[b].drug_name,
  1487. single_dose: temp[b].single_dose,
  1488. delivery_way: temp[b].delivery_way,
  1489. execution_frequency: temp[b].execution_frequency,
  1490. retail_price: temp[b].prescribing_number_unit == temp[b].max_unit ? temp[b].retail_price.toString() : temp[b].min_price.toString(),
  1491. remark: '',
  1492. day: 1,
  1493. prescribing_number: temp[b].prescribing_number,
  1494. single_dose_unit: temp[b].dose_unit,
  1495. prescribing_number_unit: temp[b].prescribing_number_unit,
  1496. medical_insurance_number: temp[b].medical_insurance_number,
  1497. drug: temp[b],
  1498. groupno: index + temp_index,
  1499. frequency_type: 1,
  1500. day_count: 0,
  1501. week_day: ''
  1502. }
  1503. if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
  1504. obj.prescribing_number = 1
  1505. }
  1506. this.prescriptions[i].advices.push(obj)
  1507. }
  1508. this.curStatus = 1
  1509. }
  1510. console.log("~~~~222222~~~~~~~")
  1511. console.log(temp2)
  1512. if (temp2.length > 0) {
  1513. console.log("~~~~11111~~~~~~~")
  1514. for (let b = 0; b < temp2.length; b++) {
  1515. let obj = {
  1516. id: 0,
  1517. project_id: temp2[b].id,
  1518. project_name: temp2[b].project_name,
  1519. statistical_classification: temp2[b].statistical_classification,
  1520. single_dose: temp2[b].single_dose,
  1521. delivery_way: temp2[b].delivery_way,
  1522. execution_frequency: temp2[b].execution_frequency,
  1523. number_days: temp2[b].number_days,
  1524. total: temp2[b].total,
  1525. price: temp2[b].price,
  1526. remark: '',
  1527. medical_code: temp2[b].medical_code,
  1528. type: temp2[b].type,
  1529. frequency_type: 1,
  1530. day_count: 0,
  1531. week_day: ''
  1532. }
  1533. if (temp2[b].type == 2) {
  1534. obj['project'] = temp2[b].project
  1535. obj['unit'] = temp2[b].project.unit
  1536. } else if (temp2[b].type == 3) {
  1537. obj['good_info'] = temp2[b].good_info
  1538. obj['unit'] = temp2[b].good_info.packing_unit
  1539. }
  1540. if (obj.total == 0 || obj.total == undefined) {
  1541. obj.total = 1
  1542. }
  1543. if (obj.type == 3) {
  1544. obj.single_dose = 1
  1545. }
  1546. this.prescriptions[i].project.push(obj)
  1547. }
  1548. this.curStatus = 2
  1549. }
  1550. this.curPrescriptions = this.prescriptions[i]
  1551. this.$refs.multipleTable.clearSelection()
  1552. this.$refs.tables.clearSelection()
  1553. }
  1554. }
  1555. this.curDrugs = []
  1556. this.preDrugs = []
  1557. this.teamList = []
  1558. }, changeAllGoodInfoTableDataTwo(row) {
  1559. this.teamList = row
  1560. },
  1561. selectChange(selection, row) {
  1562. if (this.org_id == 10206 && row.zuobiao_stock_num <= 0) {
  1563. if (row.type == 3) {
  1564. if (selection) {
  1565. selection.forEach(row => {
  1566. if (row.zuobiao_stock_num <= 0) {
  1567. this.$refs.tables.toggleRowSelection(row)
  1568. }
  1569. })
  1570. } else {
  1571. this.$refs.tables.clearSelection()
  1572. }
  1573. this.$message.error(row.project_name + '库存不足')
  1574. return
  1575. }
  1576. }
  1577. this.teamList = selection
  1578. }, getPrescriptionTemplateInfo() {
  1579. let params = {
  1580. id: this.$route.query.id
  1581. }
  1582. getPrescriptionTemplateInfo(params).then(response => {
  1583. if (response.data.state == 0) {
  1584. this.$message.error(response.data.msg)
  1585. return false
  1586. } else {
  1587. this.prescriptions = []
  1588. if (response.data.data.template.id > 0) {
  1589. this.tempForm.name = response.data.data.template.name
  1590. this.tempForm.mode_id = response.data.data.template.mode
  1591. for (let i = 0; i < response.data.data.prescriptions.length; i++) {
  1592. var prescription = response.data.data.prescriptions[i]
  1593. let tempAdvice = []
  1594. let tempProject = []
  1595. let tempAddition = []
  1596. //药品
  1597. for (let b = 0; b < prescription.advices.length; b++) {
  1598. console.log("prescription.advices[b].drug.drug_status.startsWith('停用')",prescription.advices[b].drug.drug_status.startsWith('停用'))
  1599. if(prescription.advices[b].drug!=null && prescription.advices[b].drug.drug_status.startsWith('停用') == false){
  1600. let obj = {
  1601. advice_id: prescription.advices[b].id,
  1602. drug_name: prescription.advices[b].advice_name,
  1603. single_dose: prescription.advices[b].single_dose,
  1604. delivery_way: prescription.advices[b].delivery_way,
  1605. execution_frequency: prescription.advices[b].execution_frequency,
  1606. retail_price: prescription.advices[b].price.toString(),
  1607. remark: prescription.advices[b].remark,
  1608. day: prescription.advices[b].day,
  1609. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  1610. single_dose_unit: prescription.advices[b].single_dose_unit,
  1611. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  1612. medical_insurance_number: prescription.advices[b].med_list_codg,
  1613. id: prescription.advices[b].drug_id,
  1614. drug: prescription.advices[b].drug,
  1615. groupno: prescription.advices[b].groupno,
  1616. frequency_type: prescription.advices[b].frequency_type,
  1617. day_count: prescription.advices[b].day_count,
  1618. week_day: prescription.advices[b].week_day,
  1619. number: prescription.advices[b].drug.number
  1620. }
  1621. tempAdvice.push(obj)
  1622. }
  1623. }
  1624. //项目
  1625. for (let b = 0; b < prescription.project.length; b++) {
  1626. if(prescription.project!=null && (prescription.project[b].good_info.good_status.startsWith('停用') == false )) {
  1627. if (this.org_id == 10206 || this.org_id == 0) {
  1628. let obj = {
  1629. id: prescription.project[b].id,
  1630. project_id: prescription.project[b].project_id,
  1631. project_name: prescription.project[b].project.project_name,
  1632. statistical_classification: prescription.project[b].project.statistical_classification,
  1633. single_dose: prescription.project[b].single_dose,
  1634. delivery_way: prescription.project[b].delivery_way,
  1635. execution_frequency: prescription.project[b].execution_frequency,
  1636. number_days: prescription.project[b].day,
  1637. total: prescription.project[b].count.toString(),
  1638. price: prescription.project[b].price,
  1639. remark: prescription.project[b].remark,
  1640. medical_code: prescription.project[b].project.medical_code,
  1641. type: prescription.project[b].type,
  1642. frequency_type: prescription.project[b].frequency_type,
  1643. day_count: prescription.project[b].day_count,
  1644. week_day: prescription.project[b].week_day
  1645. }
  1646. if (prescription.project[b].type == 2) {
  1647. obj['statistical_classification'] = prescription.project[b].project.statistical_classification
  1648. obj['medical_code'] = prescription.project[b].project.medical_code
  1649. obj['project_name'] = prescription.project[b].project.project_name
  1650. obj['project'] = prescription.project[b].project
  1651. obj['unit'] = prescription.project[b].unit
  1652. obj['number'] = ""
  1653. } else if (prescription.project[b].type == 3) {
  1654. obj['statistical_classification'] = ''
  1655. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  1656. obj['project_name'] = prescription.project[b].good_info.good_name
  1657. obj['good_info'] = prescription.project[b].good_info
  1658. obj['unit'] = prescription.project[b].good_info.packing_unit
  1659. obj['number'] = prescription.project[b].good_info.good_number
  1660. }
  1661. tempProject.push(obj)
  1662. }else{
  1663. if( prescription.project[b].project.medical_status!=1){
  1664. let obj = {
  1665. id: prescription.project[b].id,
  1666. project_id: prescription.project[b].project_id,
  1667. project_name: prescription.project[b].project.project_name,
  1668. statistical_classification: prescription.project[b].project.statistical_classification,
  1669. single_dose: prescription.project[b].single_dose,
  1670. delivery_way: prescription.project[b].delivery_way,
  1671. execution_frequency: prescription.project[b].execution_frequency,
  1672. number_days: prescription.project[b].day,
  1673. total: prescription.project[b].count.toString(),
  1674. price: prescription.project[b].price,
  1675. remark: prescription.project[b].remark,
  1676. medical_code: prescription.project[b].project.medical_code,
  1677. type: prescription.project[b].type,
  1678. frequency_type: prescription.project[b].frequency_type,
  1679. day_count: prescription.project[b].day_count,
  1680. week_day: prescription.project[b].week_day
  1681. }
  1682. if (prescription.project[b].type == 2) {
  1683. obj['statistical_classification'] = prescription.project[b].project.statistical_classification
  1684. obj['medical_code'] = prescription.project[b].project.medical_code
  1685. obj['project_name'] = prescription.project[b].project.project_name
  1686. obj['project'] = prescription.project[b].project
  1687. obj['unit'] = prescription.project[b].unit
  1688. } else if (prescription.project[b].type == 3) {
  1689. obj['statistical_classification'] = ''
  1690. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  1691. obj['project_name'] = prescription.project[b].good_info.good_name
  1692. obj['good_info'] = prescription.project[b].good_info
  1693. obj['unit'] = prescription.project[b].good_info.packing_unit
  1694. }
  1695. tempProject.push(obj)
  1696. }
  1697. }
  1698. }
  1699. }
  1700. // var preTime = nowTime
  1701. let index = i + 1
  1702. let obj = {
  1703. id: prescription.id,
  1704. name: '处方' + index,
  1705. advices: tempAdvice,
  1706. project: tempProject,
  1707. addition: tempAddition,
  1708. order_status: 1
  1709. // pre_time: preTime
  1710. }
  1711. if (prescription.med_type == '' || prescription.med_type == 0) {
  1712. obj['med_type'] = ''
  1713. } else {
  1714. obj['med_type'] = parseInt(prescription.med_type)
  1715. }
  1716. this.prescriptions.push(obj)
  1717. console.log("!!!!!")
  1718. console.log(this.prescriptions)
  1719. console.log("!!!!!")
  1720. }
  1721. this.curPrescriptions = this.prescriptions[0]
  1722. } else {
  1723. let obj = {
  1724. id: 0,
  1725. name: '处方1',
  1726. advices: [],
  1727. project: [],
  1728. addition: [],
  1729. order_status: 0,
  1730. med_type: ''
  1731. }
  1732. if(this.org_id == 10206) {
  1733. obj.med_type = 12
  1734. }else{
  1735. obj.med_type = 14
  1736. }
  1737. this.prescriptions.push(obj)
  1738. console.log("this.prescriptions")
  1739. console.log(this.prescriptions)
  1740. console.log("this.prescriptions")
  1741. this.curPrescriptions = this.prescriptions[0]
  1742. }
  1743. }
  1744. })
  1745. },
  1746. getlist() {
  1747. this.tabProject = []
  1748. getHisProject().then(response => {
  1749. if (response.data.state == 1) {
  1750. var project = response.data.data.project
  1751. for (let i = 0; i < project.length; i++) {
  1752. let obj = {
  1753. id: project[i].id,
  1754. project_name: project[i].project_name,
  1755. statistical_classification: project[i].statistical_classification,
  1756. single_dose: project[i].single_dose,
  1757. delivery_way: project[i].delivery_way,
  1758. execution_frequency: project[i].execution_frequency,
  1759. number_days: project[i].number_days,
  1760. price: project[i].price,
  1761. medical_code: project[i].medical_code,
  1762. unit: project[i].unit,
  1763. type: 2,
  1764. is_special_diseases: project[i].disease_directory,
  1765. project: project[i],
  1766. first_letter:project[i].first_letter,
  1767. number: "",
  1768. bbx01:project[i].bbx01,
  1769. }
  1770. this.tabProject.push(obj)
  1771. }
  1772. var good_info = response.data.data.good_info
  1773. for (let i = 0; i < good_info.length; i++) {
  1774. let obj = {
  1775. id: good_info[i].id,
  1776. project_name: good_info[i].good_name,
  1777. statistical_classification: 0,
  1778. single_dose: good_info[i].specification_name,
  1779. delivery_way: '',
  1780. execution_frequency: '',
  1781. number_days: 1,
  1782. price: good_info[i].retail_price,
  1783. medical_code: good_info[i].medical_insurance_number,
  1784. unit: this.getGoodUnit(good_info[i].good_unit),
  1785. type: 3,
  1786. is_special_diseases: good_info[i].is_special_diseases,
  1787. good_info: good_info[i],
  1788. first_letter:good_info[i].first_letter,
  1789. number: good_info[i].good_number,
  1790. bbx01:good_info[i].bbx01,
  1791. }
  1792. this.tabProject.push(obj)
  1793. }
  1794. this.allProject = this.tabProject
  1795. if(this.org_id == 10206 ) {
  1796. console.log("-=======")
  1797. console.log(this.zuobiao_project)
  1798. console.log(this.tabProject)
  1799. console.log("-=======")
  1800. for (let i = 0; i < this.zuobiao_project.length; i++) {
  1801. for (let b = 0; b < this.tabProject.length; b++) {
  1802. if (this.zuobiao_project[i].bbx01 == this.tabProject[b].bbx01 && this.zuobiao_project[i].bby06 == this.tabProject[b].single_dose){
  1803. this.tabProject[b]["zuobiao_stock_num"] = this.zuobiao_project[i].lsqty
  1804. this.tabProject[b].price = this.zuobiao_project[i].price
  1805. }
  1806. }
  1807. }
  1808. }
  1809. }
  1810. })
  1811. }, deepClone(source) {
  1812. if (!source && typeof source !== 'object') {
  1813. throw new Error('error arguments', 'shallowClone')
  1814. }
  1815. const targetObj = source.constructor === Array ? [] : {}
  1816. Object.keys(source).forEach((keys) => {
  1817. if (source[keys] && typeof source[keys] === 'object') {
  1818. targetObj[keys] = this.deepClone(source[keys])
  1819. } else {
  1820. targetObj[keys] = source[keys]
  1821. }
  1822. })
  1823. return targetObj
  1824. }, getGoodUnit(id) {
  1825. var goodUnit = this.$store.getters.good_unit
  1826. for (let i = 0; i < goodUnit.length; i++) {
  1827. if (goodUnit[i].id == id) {
  1828. return goodUnit[i].name
  1829. }
  1830. }
  1831. },
  1832. getAllProjectTeam() {
  1833. getAllProjectTeam().then(response => {
  1834. if (response.data.state == 1) {
  1835. var team = response.data.data.team
  1836. console.log('team2222', team)
  1837. this.tabPrjectTeam = team.sort(this.compare("sort"))
  1838. this.projectList = team
  1839. }
  1840. })
  1841. },
  1842. compare (property) {
  1843. return function (a, b) {
  1844. var value1 = a[property]
  1845. var value2 = b[property]
  1846. return value1 - value2
  1847. }
  1848. },
  1849. changevalue(val) {
  1850. this.$forceUpdate()
  1851. },
  1852. selectTeam(row) {
  1853. console.log('row', row)
  1854. var arr = []
  1855. for (let i = 0; i < row.length; i++) {
  1856. arr.push(row[i].item_id)
  1857. }
  1858. var ids = arr.join(',')
  1859. var strArr = ids.split(',')
  1860. var res = []//接收不重复的数据
  1861. for (var i = 0; i < strArr.length; i++) {
  1862. var flag = true
  1863. for (var j = 0; j < i; j++) {
  1864. if (strArr[i] === strArr[j]) {
  1865. flag = false
  1866. break
  1867. }
  1868. }
  1869. if (flag) {
  1870. res.push(strArr[i])
  1871. }
  1872. }
  1873. var idstr = res.join(',')
  1874. const params = {
  1875. project_id: idstr
  1876. }
  1877. getPojectListById(params).then(response => {
  1878. if (response.data.state == 1) {
  1879. this.teamList = []
  1880. var project = response.data.data.project
  1881. for (let i = 0; i < project.length; i++) {
  1882. if (project[i].type == 2) {
  1883. let obj = {
  1884. id: project[i].project_id,
  1885. project_name: project[i].project.project_name,
  1886. statistical_classification: project[i].project.statistical_classification,
  1887. single_dose: project[i].project.single_dose,
  1888. delivery_way: project[i].project.delivery_way,
  1889. execution_frequency: project[i].project.execution_frequency,
  1890. number_days: project[i].project.number_days,
  1891. total: project[i].number,
  1892. price: project[i].project.price,
  1893. remark: '',
  1894. medical_code: project[i].project.medical_code,
  1895. unit: project[i].project.unit,
  1896. type: project[i].type,
  1897. is_special_diseases: project[i].project.disease_directory,
  1898. project: project[i].project
  1899. }
  1900. if (obj.total == 0 || obj.total == undefined) {
  1901. obj.total = 1
  1902. }
  1903. this.teamList.push(obj)
  1904. } else if (project[i].type == 3) {
  1905. let obj = {
  1906. id: project[i].project_id,
  1907. project_name: project[i].good_info.good_name,
  1908. statistical_classification: '',
  1909. single_dose: '',
  1910. delivery_way: '',
  1911. execution_frequency: '',
  1912. number_days: '',
  1913. total: project[i].number,
  1914. price: project[i].good_info.retail_price,
  1915. remark: '',
  1916. medical_code: project[i].good_info.medical_insurance_number,
  1917. unit: project[i].good_info.unit,
  1918. type: project[i].type,
  1919. is_special_diseases: project[i].good_info.is_special_diseases,
  1920. good_info: project[i].good_info
  1921. }
  1922. if (obj.total == 0 || obj.total == undefined) {
  1923. obj.total = 1
  1924. }
  1925. this.teamList.push(obj)
  1926. console.log(this.teamList)
  1927. }
  1928. }
  1929. }
  1930. })
  1931. }, changeDoctor(val) {
  1932. for (let i = 0; i < this.doctors.length; i++) {
  1933. if (this.doctors[i].admin_user_id == this.doctorValue) {
  1934. this.departmentValue = this.doctors[i].department_id
  1935. }
  1936. }
  1937. if (this.departmentValue == 0) {
  1938. this.departmentValue = ''
  1939. }
  1940. },
  1941. changeDayOrMonth(tab) {
  1942. if (this.dayorMonth == 'day') {
  1943. } else if (this.dayorMonth == 'month') {
  1944. }
  1945. },
  1946. getAllProjectList() {
  1947. getAllProjectList().then(response => {
  1948. if (response.data.state == 1) {
  1949. var hisprojectlist = response.data.data.hisprojectlist
  1950. console.log('hisprojectlist', hisprojectlist)
  1951. this.hisList = hisprojectlist
  1952. }
  1953. })
  1954. },
  1955. clearSelection() {
  1956. this.$refs.tabProjectTeam.clearSelection()
  1957. },
  1958. changeMode(id){
  1959. var params = {
  1960. mode_id:id,
  1961. }
  1962. getPresciptionTemplateDetail(params).then(response=>{
  1963. if (response.data.state == 0) {
  1964. this.$message.error(response.data.msg)
  1965. return false
  1966. } else {
  1967. this.prescriptions = []
  1968. // console.log(this.tempForm)
  1969. if (response.data.data.template.id > 0) {
  1970. this.tempForm.name = response.data.data.template.name
  1971. this.tempForm.mode_id = response.data.data.template.mode
  1972. this.id = response.data.data.template.id
  1973. for (let i = 0; i < response.data.data.prescriptions.length; i++) {
  1974. var prescription = response.data.data.prescriptions[i]
  1975. let tempAdvice = []
  1976. let tempProject = []
  1977. let tempAddition = []
  1978. //药品
  1979. for (let b = 0; b < prescription.advices.length; b++) {
  1980. let obj = {
  1981. advice_id: 0,
  1982. drug_name: prescription.advices[b].advice_name,
  1983. single_dose: prescription.advices[b].single_dose,
  1984. delivery_way: prescription.advices[b].delivery_way,
  1985. execution_frequency: prescription.advices[b].execution_frequency,
  1986. retail_price: prescription.advices[b].price.toString(),
  1987. remark: prescription.advices[b].remark,
  1988. day: prescription.advices[b].day,
  1989. prescribing_number: prescription.advices[b].prescribing_number.toString(),
  1990. single_dose_unit: prescription.advices[b].single_dose_unit,
  1991. prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
  1992. medical_insurance_number: prescription.advices[b].med_list_codg,
  1993. id: prescription.advices[b].drug_id,
  1994. drug: prescription.advices[b].drug,
  1995. groupno: prescription.advices[b].groupno,
  1996. frequency_type: prescription.advices[b].frequency_type,
  1997. day_count: prescription.advices[b].day_count,
  1998. week_day: prescription.advices[b].week_day,
  1999. }
  2000. tempAdvice.push(obj)
  2001. }
  2002. //项目
  2003. for (let b = 0; b < prescription.project.length; b++) {
  2004. let obj = {
  2005. id: 0,
  2006. project_id: prescription.project[b].project_id,
  2007. project_name: prescription.project[b].project.project_name,
  2008. statistical_classification: prescription.project[b].project.statistical_classification,
  2009. single_dose: prescription.project[b].single_dose,
  2010. delivery_way: prescription.project[b].delivery_way,
  2011. execution_frequency: prescription.project[b].execution_frequency,
  2012. number_days: prescription.project[b].day,
  2013. total: prescription.project[b].count.toString(),
  2014. price: prescription.project[b].price,
  2015. remark: prescription.project[b].remark,
  2016. medical_code: prescription.project[b].project.medical_code,
  2017. unit: prescription.project[b].project.unit,
  2018. type: prescription.project[b].type,
  2019. frequency_type: prescription.project[b].frequency_type,
  2020. day_count: prescription.project[b].day_count,
  2021. week_day: prescription.project[b].week_day
  2022. }
  2023. if (prescription.project[b].type == 2) {
  2024. obj['statistical_classification'] = prescription.project[b].project.statistical_classification
  2025. obj['medical_code'] = prescription.project[b].project.medical_code
  2026. obj['project_name'] = prescription.project[b].project.project_name
  2027. obj['project'] = prescription.project[b].project
  2028. } else if (prescription.project[b].type == 3) {
  2029. obj['statistical_classification'] = ''
  2030. obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
  2031. obj['project_name'] = prescription.project[b].good_info.good_name
  2032. obj['good_info'] = prescription.project[b].good_info
  2033. }
  2034. tempProject.push(obj)
  2035. }
  2036. // var preTime = nowTime
  2037. let index = i + 1
  2038. let obj = {
  2039. id: 0,
  2040. name: '处方' + index,
  2041. advices: tempAdvice,
  2042. project: tempProject,
  2043. addition: tempAddition,
  2044. order_status: 1
  2045. // pre_time: preTime
  2046. }
  2047. if (prescription.med_type == '' || prescription.med_type == 0) {
  2048. obj['med_type'] = ''
  2049. } else {
  2050. obj['med_type'] = parseInt(prescription.med_type)
  2051. }
  2052. this.prescriptions.push(obj)
  2053. }
  2054. this.curPrescriptions = this.prescriptions[0]
  2055. } else {
  2056. let obj = {
  2057. id: 0,
  2058. name: '处方1',
  2059. advices: [],
  2060. project: [],
  2061. addition: [],
  2062. order_status: 0,
  2063. med_type: ''
  2064. }
  2065. if(this.org_id == 10206) {
  2066. obj.med_type = 12
  2067. }else{
  2068. obj.med_type = 14
  2069. }
  2070. this.prescriptions.push(obj)
  2071. this.curPrescriptions = this.prescriptions[0]
  2072. }
  2073. }
  2074. })
  2075. }
  2076. }, created() {
  2077. for(let key in this.$store.getters.treatment_mode){
  2078. this.modeOptions[key] = this.$store.getters.treatment_mode[key]
  2079. this.modeOptionsTwo[key]= this.$store.getters.treatment_mode[key]
  2080. }
  2081. var modes = this.$route.query.modes.split(',')
  2082. console.log('~~~~~~~~~~')
  2083. console.log(modes)
  2084. for (const mkey in this.modeOptions) {
  2085. console.log(mkey)
  2086. for (let b = 0; b < modes.length; b++) {
  2087. if (mkey == parseInt(modes[b])) {
  2088. delete this.modeOptions[mkey]
  2089. }
  2090. }
  2091. }
  2092. this.getZuobiaoDrugStock()
  2093. this.getZuobiaoGoodStock()
  2094. this.getPrescriptionTemplateInfo()
  2095. this.getInitData()
  2096. //获取所有项目
  2097. this.getlist()
  2098. //获取所以项目组套
  2099. this.getAllProjectTeam()
  2100. this.getAllProjectList()
  2101. this.$nextTick(() => {
  2102. this.multipleTableHeight = parseInt(this.$refs.rightTable.offsetHeight)
  2103. })
  2104. }
  2105. }
  2106. </script>
  2107. <style lang="scss" scoped>
  2108. .new-main-contain {
  2109. height: 100%;
  2110. display: flex;
  2111. flex-direction: column;
  2112. }
  2113. .app-container {
  2114. height: 100%;
  2115. }
  2116. .mainCell {
  2117. height: 36px;
  2118. display: flex;
  2119. align-items: center;
  2120. }
  2121. .mainLeft {
  2122. width: 200px;
  2123. height: 100%;
  2124. display: flex;
  2125. flex-direction: column;
  2126. margin-top: 2px;
  2127. .el-radio {
  2128. margin-right: 5px;
  2129. }
  2130. }
  2131. .mainRight {
  2132. margin-left: 20px;
  2133. flex: 1;
  2134. height: 100%;
  2135. display: flex;
  2136. flex-direction: column;
  2137. .cellSpan {
  2138. min-width: 80px;
  2139. display: inline-block;
  2140. margin-right: 10px;
  2141. }
  2142. }
  2143. .mainCenter {
  2144. display: flex;
  2145. flex: 1;
  2146. height: 100%;
  2147. }
  2148. .centerLeft {
  2149. flex: 1;
  2150. display: flex;
  2151. flex-direction: column;
  2152. position: relative;
  2153. overflow-x: auto;
  2154. .el-form-item {
  2155. width: 33%;
  2156. margin-bottom: 14px;
  2157. }
  2158. .el-form-item__label {
  2159. text-align: left;
  2160. }
  2161. }
  2162. .backColor {
  2163. background: #f6f8f9;
  2164. height: 5px;
  2165. margin-bottom: 5px;
  2166. }
  2167. .RP {
  2168. color: #409EFF;
  2169. font-size: 14px;
  2170. margin-bottom: 5px;
  2171. }
  2172. .tabsBox {
  2173. position: relative;
  2174. flex: 1;
  2175. overflow-y: auto;
  2176. margin-bottom: 60px;
  2177. /*/ / margin-top: 4 px;*/
  2178. .el-tabs__item {
  2179. padding: 0 10px;
  2180. }
  2181. }
  2182. .preTabs {
  2183. height: 100%;
  2184. display: flex;
  2185. flex-direction: column;
  2186. .el-tabs__content {
  2187. flex: 1;
  2188. overflow-y: auto;
  2189. }
  2190. }
  2191. .costBox {
  2192. width: 100%;
  2193. height: 60px;
  2194. background: #fff;
  2195. position: absolute;
  2196. bottom: 0;
  2197. display: flex;
  2198. align-items: center;
  2199. justify-content: space-between;
  2200. }
  2201. .statusRed {
  2202. color: red;
  2203. }
  2204. .addTab {
  2205. position: absolute;
  2206. right: 8px;
  2207. top: 3px;
  2208. z-index: 20;
  2209. }
  2210. .centerRight {
  2211. width: 300px;
  2212. margin-left: 10px;
  2213. display: flex;
  2214. flex-direction: column;
  2215. position: relative;
  2216. }
  2217. .rightTab {
  2218. height: 40px;
  2219. width: 100%;
  2220. border: 1px solid #d2d2d2;
  2221. box-sizing: border-box;
  2222. p {
  2223. width: 50%;
  2224. height: 40px;
  2225. line-height: 40px;
  2226. text-align: center;
  2227. background: #eee;
  2228. float: left;
  2229. }
  2230. > p:last-child {
  2231. border-left: 1px solid #d2d2d2;
  2232. float: right;
  2233. }
  2234. .activeP {
  2235. background: #409EFF;
  2236. color: #fff;
  2237. }
  2238. }
  2239. .rightTabs {
  2240. display: flex;
  2241. flex-direction: column;
  2242. }
  2243. .comfirmBox {
  2244. width: 100%;
  2245. height: 60px;
  2246. background: #fff;
  2247. position: absolute;
  2248. bottom: 0;
  2249. display: flex;
  2250. align-items: center;
  2251. justify-content: space-between;
  2252. z-index: 99;
  2253. }
  2254. .borderCard {
  2255. height: 100%;
  2256. display: flex;
  2257. flex-direction: column;
  2258. margin-bottom: 60px;
  2259. .el-tabs--border-card > .el-tabs__content {
  2260. padding: 0;
  2261. }
  2262. }
  2263. </style>
  2264. <style lang="scss">
  2265. .borderCard {
  2266. .el-tabs__nav {
  2267. width: 100%;
  2268. }
  2269. .el-tabs__item {
  2270. width: 50%;
  2271. text-align: center;
  2272. }
  2273. .el-tabs__content {
  2274. padding: 5px;
  2275. flex: 1;
  2276. }
  2277. }
  2278. .centerLeft {
  2279. .el-form-item__label {
  2280. text-align: left;
  2281. }
  2282. }
  2283. .tabsBox {
  2284. .el-tabs__item {
  2285. padding: 0 10px;
  2286. }
  2287. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
  2288. padding: 0 10px;
  2289. }
  2290. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
  2291. padding: 0 10px;
  2292. }
  2293. .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
  2294. padding: 0 10px;
  2295. }
  2296. }
  2297. .centerRight {
  2298. .el-tabs__nav-scroll {
  2299. display: flex;
  2300. }
  2301. .el-tabs__nav {
  2302. margin: 0 auto;
  2303. }
  2304. .el-table th .cell, .el-table td .cell {
  2305. padding: 0 2px;
  2306. }
  2307. }
  2308. .preTabs {
  2309. .el-tabs__content {
  2310. flex: 1;
  2311. overflow-y: auto;
  2312. padding: 5px 0 5px 5px;
  2313. }
  2314. }
  2315. .rightTabs {
  2316. height: 100%;
  2317. .el-tabs__nav {
  2318. width: auto;
  2319. }
  2320. .el-tabs__header {
  2321. margin-bottom: 5px;
  2322. }
  2323. .el-tabs__item {
  2324. width: auto;
  2325. text-align: inherit;
  2326. }
  2327. .el-tabs__content {
  2328. flex: 1;
  2329. overflow-y: auto;
  2330. }
  2331. .el-tab-pane {
  2332. display: flex;
  2333. flex-direction: column;
  2334. height: 100%;
  2335. }
  2336. }
  2337. #tab-more {
  2338. .el-icon-close {
  2339. display: none;
  2340. }
  2341. }
  2342. ::-webkit-scrollbar {
  2343. height: 15px;
  2344. }
  2345. </style>