MedicineAndChina.vue 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133
  1. // 中成药
  2. <template>
  3. <div class="zcy">
  4. <div class="chinese_medicine">
  5. <div class="flex flex-row-right">
  6. <div class="t-con-radio flex-vertical-center-l" style="flex-wrap: wrap;align-items: center;">
  7. <div class="t-radio-group2" :class="{multiple: group.options.length > 1}" v-for="group in pharmacyTypeGroup" :key="group.name">
  8. <label v-if="group.options.length > 1">{{group.name}}</label>
  9. <el-radio v-for="item in group.options" :key="item.ptype"
  10. v-model="recipe.radio"
  11. :disabled="recipe.disable"
  12. :label="item.ptype"
  13. @click.native.prevent="recipe.disable || changePharmacy(recipe.lastType,item.ptype)"
  14. >{{item.name}}</el-radio>
  15. </div>
  16. </div>
  17. <div class="clearer flex-center" @click="clearData();$emit('clear')">清空</div>
  18. </div>
  19. <div class="c-m-table">
  20. <div class="table-body table-show">
  21. <el-table :data="tableData3" style="width:100%;" :span-method="arraySpanMethod">
  22. <el-table-column prop="id" label width="20" fixed="left">
  23. <template slot-scope="scope">
  24. <div v-if="!scope.row.name" class="flex-vertical-between">
  25. <div style="width:80px;" class="operate2" id="operate2">
  26. <el-input
  27. :value="scope.row.key"
  28. :id="'searchD1'+scope.row.id"
  29. size="mini"
  30. placeholder="请输入..."
  31. @input="searchDrug($event,scope)"
  32. @blur="drugBlur($event,scope)"
  33. @keydown.down.native="drugDown($event,scope)"
  34. @keydown.up.native="drugUp($event,scope)"
  35. @keydown.enter.native="drugEnter(scope)"
  36. :disabled="!editable"
  37. ></el-input>
  38. <div class="table-choose3" v-if="scope.row.key">
  39. <div class="table-choose-h flex-vertical-between">
  40. <div class="flex-center">药品名称</div>
  41. <div class="flex-center">规格</div>
  42. <div class="flex-center">产地</div>
  43. <div class="flex-center">库存</div>
  44. </div>
  45. <div
  46. class="t-c-b infinite-list"
  47. v-infinite-scroll="load"
  48. :infinite-scroll-immediate="false"
  49. :id="'infiniteList'+scope.row.id"
  50. :ref="'infiniteList'+scope.row.id"
  51. style="overflow:auto"
  52. >
  53. <div
  54. class="infinite-list-item flex-vertical-between"
  55. :style="scope.row.search_i===index1?'background:#EDF3FE;':''"
  56. @click="chooseDis3(scope,index1,item1)"
  57. v-for="(item1,index1) in scope.row.drugList"
  58. :key="index1"
  59. >
  60. <p class="flex-center">{{item1.ypmc}}</p>
  61. <p class="flex-center">{{item1.gg}}</p>
  62. <p class>{{item1.cdmc}}</p>
  63. <p class="flex-center">{{item1.kc}}</p>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <!-- <div class="operate1" v-if="scope.row.id!==tableData3.length && !scope.row.name">
  69. <img src="../assets/delete1.png" alt="" @click="deleteDis1(scope)" />
  70. </div>-->
  71. </div>
  72. <!-- -->
  73. <div v-else>{{scope.row.id}}</div>
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="name" label="药品名称" fixed="left">
  77. <template slot-scope="scope">
  78. <div
  79. @click="clickName(scope)"
  80. v-if="!scope.row.showSearch"
  81. :style="{'color':scope.row.color?scope.row.color:''}"
  82. >{{scope.row.name}}</div>
  83. <div v-else class="flex-vertical-between">
  84. <div style="width:80px;">
  85. <el-input
  86. :value="scope.row.key"
  87. :id="'searchD1'+scope.row.id"
  88. size="mini"
  89. :placeholder="scope.row.name"
  90. @input="searchDrug($event,scope)"
  91. @blur="drugBlur1($event,scope)"
  92. @keydown.down.native="drugDown($event,scope)"
  93. @keydown.up.native="drugUp($event,scope)"
  94. @keydown.enter.native="drugEnter(scope)"
  95. :disabled="!editable"
  96. ></el-input>
  97. <!-- v-model="scope.row.key" -->
  98. <div class="table-choose3" v-if="scope.row.key">
  99. <div class="table-choose-h flex-vertical-between">
  100. <div class="flex-center">药品名称</div>
  101. <div class="flex-center">规格</div>
  102. <div class="flex-center">产地</div>
  103. <div class="flex-center">库存</div>
  104. </div>
  105. <!-- -->
  106. <div
  107. class="t-c-b infinite-list"
  108. v-infinite-scroll="load"
  109. :infinite-scroll-immediate="false"
  110. :id="'infiniteList'+scope.row.id"
  111. :ref="'infiniteList'+scope.row.id"
  112. style="overflow:auto"
  113. >
  114. <div
  115. class="infinite-list-item flex-vertical-between"
  116. :style="scope.row.search_i===index1?'background:#EDF3FE;':''"
  117. @click="chooseDis3(scope,index1,item1)"
  118. v-for="(item1,index1) in scope.row.drugList"
  119. :key="index1"
  120. >
  121. <p class="flex-center">{{item1.ypmc}}</p>
  122. <p class="flex-center">{{item1.gg}}</p>
  123. <p class>{{item1.cdmc}}</p>
  124. <p class="flex-center">{{item1.kc}}</p>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </template>
  131. </el-table-column>
  132. <el-table-column prop="spec" label="规格" width="100"></el-table-column>
  133. <el-table-column prop="originname" label="产地"></el-table-column>
  134. <el-table-column prop="usage" label="用法" width="90">
  135. <template slot-scope="scope" v-if="scope.row.name">
  136. <el-select
  137. v-model="scope.row.usage"
  138. placeholder="请选择"
  139. size="mini"
  140. @change="usageChange($event,scope)"
  141. >
  142. <el-option
  143. :label="item.value"
  144. :value="item.key"
  145. v-for="(item,index) in scope.row.usageList"
  146. :key="index"
  147. ></el-option>
  148. </el-select>
  149. </template>
  150. </el-table-column>
  151. <el-table-column prop="timesQuan" label="次用量" width="160">
  152. <template slot-scope="scope" v-if="scope.row.name">
  153. <div class="flex flex-row-center">
  154. <div class="t_dose">
  155. <el-input
  156. v-model="scope.row.timesQuan"
  157. size="mini"
  158. @input="timesQuanC($event,scope)"
  159. ></el-input>
  160. </div>
  161. <div class="t_dose">
  162. <el-select
  163. size="mini"
  164. v-model="scope.row.timesUnit"
  165. @change="timesUnitC($event,scope)"
  166. >
  167. <el-option value="1" label="g"></el-option>
  168. <el-option value="2" label="支"></el-option>
  169. <el-option value="3" label="个"></el-option>
  170. </el-select>
  171. </div>
  172. <!-- <div class="unit">{{scope.row.usage=='2'?'ml':'克'}}</div> -->
  173. </div>
  174. </template>
  175. </el-table-column>
  176. <el-table-column prop="nums" label="频次" width="90">
  177. <template slot-scope="scope">
  178. <el-select
  179. v-model="scope.row.nums"
  180. placeholder="请选择"
  181. size="mini"
  182. @change="numsChange($event,scope)"
  183. v-if="scope.row.name"
  184. >
  185. <el-option
  186. :label="item.value"
  187. :value="item.key"
  188. v-for="(item,index) in scope.row.numList"
  189. :key="index"
  190. ></el-option>
  191. </el-select>
  192. </template>
  193. </el-table-column>
  194. <el-table-column prop="dose" label="数量" width="160">
  195. <template slot-scope="scope" v-if="scope.row.name">
  196. <div class="flex flex-row-center">
  197. <div class="t_dose">
  198. <el-input
  199. :value="scope.row.dose"
  200. size="mini"
  201. @input="countDoseMoney($event,scope)"
  202. :id="'dose1'+scope.row.id"
  203. @keydown.enter.native="doseEnter(scope)"
  204. ></el-input>
  205. </div>
  206. <div class="t_dose">
  207. <el-select
  208. size="mini"
  209. v-model="scope.row.doseUnit"
  210. @change="doseUnitC($event,scope)"
  211. >
  212. <el-option
  213. :value="item.value"
  214. :label="item.key"
  215. v-for="(item,index) in bzdwList"
  216. :key="index"
  217. ></el-option>
  218. </el-select>
  219. </div>
  220. </div>
  221. </template>
  222. </el-table-column>
  223. <!-- <el-table-column prop="unit" label="单位" width="50"></el-table-column> -->
  224. <el-table-column prop="price" label="单价" width="50"></el-table-column>
  225. <!-- <el-table-column prop="time" label="服药时间" width="100">
  226. <template slot-scope="scope" v-if="scope.row.name">
  227. <el-select v-model="scope.row.time" placeholder="请选择" size='mini'
  228. @change="timeC($event,scope)">
  229. <el-option :label="item.value" :value="item.key"
  230. v-for="(item,index) in scope.row.timeList" :key="index"></el-option>
  231. </el-select>
  232. </template>
  233. </el-table-column>-->
  234. <!-- <el-table-column prop="price" label="单价" width="50">
  235. </el-table-column>-->
  236. <el-table-column prop="total" label="小计" width="80"></el-table-column>
  237. <!-- <el-table-column prop="inventory" label="库存" width="50">
  238. </el-table-column>-->
  239. <el-table-column label="操作" width="64" fixed="right">
  240. <template slot-scope="scope">
  241. <div class="operate" v-if="scope.row.name">
  242. <div v-if="editable">
  243. <img src="../assets/add.png" alt @click="addDrug3(scope)" />
  244. </div>
  245. <div v-if="editable">
  246. <img src="../assets/delete1.png" alt @click="deleteDrug3(scope)" />
  247. </div>
  248. <div>
  249. <img src="../assets/find.png" alt @click="findDrug(scope)" />
  250. </div>
  251. </div>
  252. <div class="operate" v-else-if="scope.row.id==tableData3.length && !scope.row.name">
  253. <div style="opacity:0;">
  254. <img src="../assets/find.png" alt />
  255. </div>
  256. </div>
  257. <div v-else class="operate">
  258. <div v-if="editable && scope.row.id!==tableData3.length">
  259. <img src="../assets/delete1.png" alt @click="deleteDrug3(scope)" />
  260. </div>
  261. </div>
  262. </template>
  263. </el-table-column>
  264. </el-table>
  265. </div>
  266. <!-- 底部处方 -->
  267. <div class="table-bottom">
  268. <div class="table-b-header">
  269. <div v-if="bottom_form.usege=='xz'" class="header-about">
  270. <div class="item flex-vertical-center-l">
  271. <span>操作指南:</span>
  272. <div style="flex:1;">
  273. <el-input size="mini" placeholder="请输入" v-model="bottom_form.caozuo"></el-input>
  274. </div>
  275. </div>
  276. </div>
  277. <div class="header-about">
  278. <div class="item flex-vertical-center-l">
  279. <span>嘱托:</span>
  280. <div style="flex:1;">
  281. <el-input size="mini" placeholder="请输入" v-model="bottom_form.zhutuo"></el-input>
  282. </div>
  283. </div>
  284. </div>
  285. <!-- v-if="container_i!=2" -->
  286. <div class="header-about flex-vertical-center-l flex-wrap" v-if="false">
  287. <!-- <div class="item flex-vertical-center-l">
  288. <span>配送:</span>
  289. <div class="div1">
  290. <el-radio-group v-model="bottom_form.radio" @change="getAdd">
  291. <el-radio label="0">是</el-radio>
  292. <el-radio label="1">否</el-radio>
  293. </el-radio-group>
  294. </div>
  295. </div>-->
  296. <div class="item flex-vertical-center-l">
  297. <div
  298. class="daijiao-check flex flex-row-left flex-col-center"
  299. @click="changePeiSong"
  300. >
  301. <div :class="['img-body',bottom_form.radio==0?'active':'']">
  302. <img src="~@/assets/new-icon/checked.png" alt v-if="bottom_form.radio==0" />
  303. </div>
  304. <span>配送</span>
  305. </div>
  306. </div>
  307. <div class="item flex-vertical-center-l" v-if="bottom_form.radio==0">
  308. <span>收货人:</span>
  309. <div class="div1">
  310. <el-input size="mini" placeholder="请输入" v-model="bottom_form.savename"></el-input>
  311. </div>
  312. </div>
  313. <div class="item flex-vertical-center-l" v-if="bottom_form.radio==0">
  314. <span>电话:</span>
  315. <div class="div1">
  316. <el-input size="mini" placeholder="请输入" v-model="bottom_form.phone"></el-input>
  317. </div>
  318. </div>
  319. <div class="item flex-vertical-center-l flex-wrap" v-if="bottom_form.radio==0">
  320. <span>地址:</span>
  321. <div class="city1 city">
  322. <el-select
  323. size="mini"
  324. v-model="province"
  325. placeholder="选择省"
  326. @change="proC($event)"
  327. >
  328. <el-option
  329. :label="item.name"
  330. :value="item.code"
  331. v-for="(item,index) in provinceList"
  332. :key="index"
  333. ></el-option>
  334. </el-select>
  335. </div>
  336. <div class="city1 city">
  337. <el-select size="mini" v-model="city" placeholder="选择市" @change="cityC($event)">
  338. <el-option
  339. :label="item.name"
  340. :value="item.code"
  341. v-for="(item,index) in cityList"
  342. :key="index"
  343. ></el-option>
  344. </el-select>
  345. </div>
  346. <div class="city1 city">
  347. <el-select size="mini" v-model="area" placeholder="选择区">
  348. <el-option
  349. :label="item.name"
  350. :value="item.code"
  351. v-for="(item,index) in areaList"
  352. :key="index"
  353. ></el-option>
  354. </el-select>
  355. </div>
  356. <div class="div4">
  357. <el-input size="mini" placeholder="请输入详细地址" v-model="bottom_form.address"></el-input>
  358. </div>
  359. </div>
  360. <div
  361. class="right flex-center"
  362. v-if="bottom_form.radio==0"
  363. @click="getAddressForHospital"
  364. >寄到本院</div>
  365. </div>
  366. </div>
  367. </div>
  368. </div>
  369. </div>
  370. <!-- 留在这个页面 -->
  371. <div class="table-b-bottom flex-vertical-between">
  372. <div class="t-b-b-left flex-vertical-center-l flex-wrap">
  373. <div class="t-b-l-item">
  374. 当前处方金额:
  375. <span>{{nowRecipeMoney}}元</span>
  376. </div>
  377. <div class="t-b-l-item" v-if="container_i==0">
  378. 单剂金额:
  379. <span>10元</span>
  380. </div>
  381. <div class="t-b-l-item" v-if="bottom_form.daijian && bottom_form.doseType=='tj'">
  382. 代煎费:
  383. <span>10元</span>
  384. </div>
  385. <div class="t-b-l-item" v-if="bottom_form.radio==0" v-show="moneyMsg.deliveryPrice">
  386. 配送费:
  387. <span>{{moneyMsg.deliveryPrice}}元</span>
  388. </div>
  389. <div class="t-b-l-item" v-if="bottom_form.doseType=='gj'">
  390. 制膏费:
  391. <span>10元</span>
  392. </div>
  393. <div class="t-b-l-item">
  394. 合计费用:
  395. <span>{{allMoney}}元</span>
  396. </div>
  397. </div>
  398. <div class="t-b-b-right flex-vertical-center-r">
  399. <!-- <div class="flex-center bg-green" @click="submit()" v-if="showSubmit">提交处方</div> -->
  400. <template v-if="isAutoCheck==0">
  401. <el-button
  402. type="primary"
  403. size="mini"
  404. @click="submit()"
  405. v-if="editable"
  406. >保存处方</el-button>
  407. </template>
  408. <template v-if="isAutoCheck==1">
  409. <el-button
  410. type="primary"
  411. size="mini"
  412. @click="submit()"
  413. v-if="editable"
  414. >保存处方</el-button>
  415. </template>
  416. </div>
  417. </div>
  418. </div>
  419. </template>
  420. <script>
  421. import {
  422. getProver,
  423. getArea,
  424. getSelectType,
  425. getPharmacyMsg,
  426. getPatAddress
  427. } from "@/api/city.js";
  428. import {
  429. changePharmacy,
  430. getTableDrug,
  431. getAddressForHospital,
  432. getPharmacyID,
  433. customerQuery,
  434. getBzdw
  435. } from "@/api/diagnosis.js";
  436. import { debounce } from "@/utils/format.js";
  437. import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
  438. import { getDataByKey } from "@/api/system.js";
  439. let medicineBlurTimer;
  440. export default {
  441. name: "medandchinese",
  442. props: {
  443. container_i: {
  444. type: Number,
  445. default: 1
  446. },
  447. showSubmit: {
  448. type: Boolean,
  449. default: true
  450. },
  451. isPs: {
  452. type: Number,
  453. default: 1
  454. }
  455. },
  456. watch: {
  457. isPs: {
  458. immediate: true,
  459. deep: true,
  460. handler: function() {
  461. this.bottom_form.radio = this.isPs;
  462. }
  463. },
  464. getuserinfo: {
  465. deep: true,
  466. immediate: true,
  467. handler() {
  468. if (this.getuserinfo.organizationid) {
  469. this.getDataByKey("automaticReview");
  470. }
  471. }
  472. }
  473. },
  474. data() {
  475. return {
  476. name: "中药制剂",
  477. prescribed: 0,
  478. isAutoCheck: "0", // 是否自动审核 0 手动 1自动 (自动的时候用his 的是否支付成功字段 判断显示)
  479. paystate: 0, // 云his 是否支付 0 否 1是(为否可以编辑)
  480. tableData3: [
  481. {
  482. id: 1,
  483. key: "",
  484. drugList: [],
  485. search_i: 0,
  486. showSearch: false,
  487. page: 1,
  488. loadMore: true,
  489. usageList: [],
  490. numList: [],
  491. timeList: []
  492. }
  493. ],
  494. /**
  495. * 相当于 recipe_tabs[recipe_tabs_c]
  496. */
  497. recipe: {},
  498. bzdwList: [],
  499. page: 1,
  500. // 底部表单
  501. bottom_form: {
  502. doseNum: "",
  503. doseType: "",
  504. usege: "",
  505. num: "",
  506. daijian: "",
  507. nongjian: "",
  508. time: "",
  509. caozuo: "",
  510. zhutuo: "",
  511. radio: "1",
  512. savename: "", // 收货人
  513. address: "",
  514. phone: "",
  515. doseType1: "zc",
  516. doseNum: ""
  517. },
  518. pharmacyList: [], // 药房选择器 数据
  519. pharmacyTypes: [],
  520. pharmacyTypeGroup: [],
  521. pharmacyID: "", // 药房id
  522. isPay: false,
  523. province: "",
  524. city: "",
  525. area: "",
  526. provinceList: [],
  527. cityList: [],
  528. areaList: [],
  529. moneyMsg: {},
  530. nowRecipeMoney: 0, // 当前处方金额
  531. allMoney: 0, // 合计金额
  532. index: 0
  533. };
  534. },
  535. created() {
  536. this.loaded();
  537. // this.getTableDrug(,'1)
  538. this.getProver();
  539. // this.getPharmacyMsg(1)
  540. this.getSelectType("中药制剂药品用法", 0);
  541. this.getSelectType("中药制剂服药时间", 0);
  542. this.getSelectType("中药制剂频次", 0);
  543. this.getPharmacyID();
  544. // this.customerQuery()
  545. this._getBzdw();
  546. },
  547. methods: {
  548. async loaded(props) {
  549. if (!this.pharmacyTypes.length) await this.customerQuery().catch(() => void 0);
  550. let defaultProps = this.recipe;
  551. try {
  552. defaultProps = {...this.pharmacyTypes[0], ...defaultProps};
  553. this.recipe.pharmacyID = defaultProps.pharmacyID || this.pharmacyList[0].pid;
  554. this.recipe.radio = defaultProps.radio || defaultProps.ptype;
  555. this.recipe.lastType = defaultProps.radio || defaultProps.ptype;
  556. } catch (e) {}
  557. this.$forceUpdate();
  558. return this;
  559. },
  560. // 配送点击
  561. changePeiSong() {
  562. this.bottom_form.radio = this.bottom_form.radio == "1" ? "0" : "1";
  563. this.getAdd(this.bottom_form.radio);
  564. },
  565. // 获取地址
  566. getAdd(e) {
  567. if (e == 1) {
  568. this.province = "";
  569. this.city = "";
  570. this.area = "";
  571. this.bottom_form.savename = "";
  572. this.bottom_form.phone = "";
  573. this.bottom_form.address = "";
  574. } else {
  575. this.getPatAddress();
  576. }
  577. this.countNowRecipeMoney();
  578. },
  579. findDrug(scope) {
  580. this.$emit("find", scope);
  581. },
  582. // 频次改变
  583. numsChange(e, scope) {
  584. this.tableData3[scope.$index].nums = e;
  585. this.tableData3 = this.tableData3.map(item => ({...item}));
  586. },
  587. usageChange(e, scope) {
  588. this.tableData3[scope.$index].usage = e;
  589. this.tableData3 = this.tableData3.map(item => ({...item}));
  590. },
  591. // 渲染次用量
  592. timesQuanC(e, scope) {
  593. this.tableData3[scope.$index].timesQuan = e;
  594. this.tableData3 = this.tableData3.map(item => ({...item}));
  595. },
  596. // 数量 单位修改
  597. doseUnitC(e, scope) {
  598. this.tableData3[scope.$index].doseUnit = e;
  599. this.tableData3 = this.tableData3.map(item => ({...item}));
  600. },
  601. // 次用量单位 修改
  602. timesUnitC(e, scope) {
  603. this.tableData3[scope.$index].timesUnit = e;
  604. this.tableData3 = this.tableData3.map(item => ({...item}));
  605. },
  606. // 渲染服药时间
  607. timeC(e, scope) {
  608. this.tableData3[scope.$index].time = e;
  609. this.tableData3 = this.tableData3.map(item => ({...item}));
  610. },
  611. // 计算当前处方金额
  612. countNowRecipeMoney() {
  613. let data = this.tableData3;
  614. let total = 0;
  615. data.forEach(item => {
  616. if (item.total) {
  617. total += Number(item.total);
  618. }
  619. });
  620. this.nowRecipeMoney = total.toFixed(2);
  621. // 是否配送
  622. let isDelivery = this.bottom_form.radio;
  623. //配送费
  624. let deliveryPrice =
  625. isDelivery == 0 ? this.moneyMsg.deliveryPrice || 0 : 0;
  626. this.allMoney = Number(total.toFixed(2)) + Number(deliveryPrice);
  627. this.$emit("update:totalAllMoney", this.allMoney);
  628. },
  629. countDoseMoney(e, scope) {
  630. scope.row.dose = e;
  631. scope.row.total = (
  632. Number(this.tableData3[scope.$index].dose) *
  633. Number(this.tableData3[scope.$index].price)
  634. ).toFixed(2);
  635. // setTimeout(() => {
  636. // document.querySelectorAll('#dose' + scope.row.id)[0].value = e
  637. // }, 200)
  638. this.$set(this.tableData3, scope.$index, scope.row);
  639. this.countNowRecipeMoney();
  640. },
  641. // 清空按钮点击
  642. clearData() {
  643. this.tableData3 = [];
  644. this.tableData3.push({
  645. id: 1,
  646. key: "",
  647. drugList: [],
  648. search_i: 0,
  649. showSearch: false,
  650. page: 1,
  651. loadMore: true
  652. });
  653. this.page = 1;
  654. this.countNowRecipeMoney();
  655. },
  656. load() {
  657. let key = this.tableData3[this.index].key;
  658. let page = this.tableData3[this.index].page;
  659. let loadMore = this.tableData3[this.index].loadMore;
  660. let index = this.tableData3[this.index].id - 1;
  661. if (loadMore) {
  662. page += 1;
  663. }
  664. // console.log('思辨')
  665. this.getTableDrug(key, page, index, loadMore);
  666. },
  667. // 搜索展示药品
  668. searchDrug(e, scope) {
  669. this.tableData3[scope.$index].key = e;
  670. this.page = scope.row.page;
  671. // debounce(this.getTableDrug(e, 1, scope.$index), 1000)
  672. debounce(this.getTableDrug(scope.row.key, 1, scope.row.id - 1), 10000);
  673. let index = scope.row.id ? scope.row.id - 1 : 0;
  674. this.index = index;
  675. this.tableData3[index].key = e;
  676. this.tableData3[index].search_i = 0;
  677. },
  678. // 药品名称 输入框失去焦点
  679. drugBlur(e, scope) {
  680. return this.drugBlur1(e, scope)
  681. },
  682. drugBlur1(e, scope) {
  683. medicineBlurTimer = setTimeout(() => {
  684. this.tableData3[scope.row.id - 1].key = "";
  685. this.tableData3[scope.row.id - 1].showSearch = false;
  686. let ids = document.querySelectorAll("#operate2");
  687. ids.forEach((item, index) => {
  688. item.style["z-index"] = "99";
  689. });
  690. }, 500);
  691. },
  692. // 监听键盘事件
  693. drugDown(e, scope) {
  694. let totalData = this.tableData3;
  695. // 如果到最后一个 判断是否需要分页
  696. if (
  697. totalData[scope.row.id - 1].search_i ==
  698. totalData[scope.row.id - 1].drugList.length - 1
  699. ) {
  700. // totalData[scope.$index].search_i
  701. if (totalData[scope.row.id - 1].loadMore) {
  702. totalData[scope.row.id - 1].page += 1;
  703. this.getTableDrug(
  704. totalData[scope.row.id - 1].key,
  705. totalData[scope.row.id - 1].page,
  706. scope.row.id - 1,
  707. totalData[scope.row.id - 1].loadMore
  708. );
  709. totalData[scope.row.id - 1].search_i += 1;
  710. }
  711. } else {
  712. totalData[scope.row.id - 1].search_i += 1;
  713. }
  714. // 表格 fixed 时 去 下标 为 1
  715. if (totalData[scope.row.id - 1].drugList.length > 5) {
  716. document.querySelectorAll(
  717. `#infiniteList${scope.row.id}`
  718. )[1].scrollTop += 36;
  719. console.log(
  720. document.querySelectorAll(`#infiniteList${scope.row.id}`)[1]
  721. .scrollTop,
  722. "top"
  723. );
  724. }
  725. this.tableData3 = totalData.filter((item, index) => {
  726. // this.getSelectType('中药药品用法', index)
  727. return (item.id = index + 1);
  728. });
  729. this.$forceUpdate();
  730. },
  731. drugUp(e, scope) {
  732. let totalData = this.tableData3;
  733. // 如果到最后一个 判断是否需要分页
  734. if (totalData[scope.row.id - 1].search_i == 0) {
  735. // totalData[scope.$index].search_i
  736. } else {
  737. totalData[scope.row.id - 1].search_i -= 1;
  738. }
  739. if (
  740. document.querySelectorAll(`#infiniteList${scope.row.id}`)[1].scrollTop >
  741. 0
  742. ) {
  743. document.querySelectorAll(
  744. `#infiniteList${scope.row.id}`
  745. )[1].scrollTop -= 36;
  746. }
  747. this.tableData3 = totalData.filter((item, index) => {
  748. // this.getSelectType('中药药品用法', index)
  749. return (item.id = index + 1);
  750. });
  751. },
  752. drugEnter(scope) {
  753. this.chooseDis3(
  754. scope,
  755. scope.row.search_i,
  756. scope.row.drugList[scope.row.search_i]
  757. );
  758. },
  759. clickName(scope) {
  760. if (medicineBlurTimer) clearTimeout(medicineBlurTimer);
  761. const index = scope.$index;
  762. scope.row.id = index + 1;
  763. this.tableData3[index].id = index;
  764. this.tableData3[index].key = scope.row.name;
  765. this.tableData3[index].showSearch = true;
  766. this.tableData3[index].search_i = 0;
  767. this.tableData3 = this.tableData3.map(item => ({...item}));
  768. debounce(this.getTableDrug(scope.row.key, 1, index), 10000);
  769. setTimeout(() => {
  770. console.log(document.querySelectorAll("#searchD1" + scope.row.id));
  771. document.querySelectorAll("#searchD1" + scope.row.id)[1].focus();
  772. }, 500);
  773. },
  774. doseEnter(scope) {
  775. if (scope.row.id == this.tableData3.length - 1) {
  776. // console.log(document.querySelectorAll('#searchD1' + (scope.row.id + 1)), '啦啦啦')
  777. document.querySelectorAll("#searchD1" + (scope.row.id + 1))[1].focus();
  778. } else {
  779. try {
  780. this.tableData3.forEach(item => {
  781. if (item.name && !item.dose && scope.row.id < item.id) {
  782. document.querySelectorAll("#dose1" + item.id)[0].focus();
  783. throw Error();
  784. }
  785. if (!item.name) {
  786. // console.log(document.querySelectorAll('#searchD1' + item.id), '啦啦啦')
  787. document.querySelectorAll("#searchD1" + item.id)[1].focus();
  788. throw Error();
  789. }
  790. });
  791. } catch (error) {}
  792. }
  793. },
  794. // 选中中成药方
  795. chooseDis3(scope, index, item) {
  796. if (!item) return;
  797. const totalData = this.tableData3;
  798. const i = totalData.findIndex(t => t.medid === item.pid);
  799. const oneself = i === scope.row.id - 1;
  800. if (i !== -1 && !oneself) {
  801. this.$message.warning("请勿重复添加药品");
  802. clearTimeout(medicineBlurTimer);
  803. return;
  804. }
  805. let obj = {
  806. color: item.kc == 0 ? "red" : "#000",
  807. id: scope.row.id,
  808. name: item.ypmc,
  809. spec: item.gg, // 规格
  810. timesQuan: item.timesQuan || "", // 次用量
  811. timesUnit: item.timesUnit || "", // 次用量单位
  812. dose: scope.row.color === "red" || oneself ? null : "", // 剂量 数量
  813. doseUnit: item.doseUnit || '', // 数量单位
  814. unit: item.dw, // 单位
  815. // unit: item.bzdw, // 单位
  816. // usage: item.usagestr, // 用法
  817. usage: item.usage || "",
  818. // price: item.lsjg,
  819. price: item.price,
  820. total: 0,
  821. inventory: item.kc, // 库存
  822. key: "",
  823. search_i: index,
  824. medid: item.pid, // 药品id
  825. showSearch: false,
  826. originname: item.cdmc // 产地名称
  827. };
  828. if (obj.dose == null) {
  829. obj.dose = scope.row.dose;
  830. }
  831. const m = Object.assign(totalData[scope.$index], obj);
  832. this.tableData3[scope.$index] = m;
  833. if (scope.$index == this.tableData3.length - 1) {
  834. this.tableData3.push({
  835. search_i: 0,
  836. key: "",
  837. page: 1,
  838. drugList: [],
  839. usageList: [],
  840. numList: [],
  841. timeList: [],
  842. loadMore: true
  843. });
  844. }
  845. this.tableData3.filter((item, index) => {
  846. this.getSelectType("中药制剂药品用法", index);
  847. this.getSelectType("中药制剂服药时间", index);
  848. this.getSelectType("中药制剂频次", index);
  849. return (item.id = index + 1);
  850. });
  851. setTimeout(() => {
  852. let ids = document.querySelectorAll("#dose1" + scope.row.id);
  853. // console.log(ids, 'ids');
  854. // ids[0].style.color = 'red'
  855. document.querySelectorAll("#dose1" + scope.row.id)[0].focus();
  856. }, 500);
  857. },
  858. // 表三 添加
  859. addDrug3(scope) {
  860. let tableData3 = this.tableData3;
  861. if (scope.$index == tableData3.length - 1) {
  862. this.tableData3.push({
  863. key: "",
  864. page: 1,
  865. drugList: [],
  866. usageList: [],
  867. numList: [],
  868. timeList: [],
  869. loadMore: true,
  870. search_i: 0,
  871. showSearch: false
  872. });
  873. this.getSelectType("中药制剂药品用法", this.tableData3.length - 1);
  874. this.getSelectType("中药制剂服药时间", this.tableData3.length - 1);
  875. this.getSelectType("中药制剂频次", this.tableData3.length - 1);
  876. } else {
  877. let data = tableData3.splice(scope.row.id);
  878. tableData3.push({
  879. id: 2,
  880. drugList: [],
  881. page: 1,
  882. key: "",
  883. usageList: [],
  884. numList: [],
  885. timeList: [],
  886. loadMore: true,
  887. search_i: 0,
  888. showSearch: false
  889. });
  890. tableData3 = tableData3.concat(data);
  891. this.tableData3 = tableData3;
  892. this.getSelectType("中药制剂药品用法", scope.$index + 1);
  893. this.getSelectType("中药制剂服药时间", scope.$index + 1);
  894. this.getSelectType("中药制剂频次", scope.$index + 1);
  895. }
  896. this.tableData3.filter((item, index) => {
  897. return (item.id = index + 1);
  898. });
  899. },
  900. // 表三 删除
  901. deleteDrug3(scope) {
  902. if (this.tableData3.length > 1) {
  903. this.tableData3.splice(scope.$index, 1);
  904. this.tableData3.filter((item, index) => {
  905. return (item.id = index + 1);
  906. });
  907. this.countNowRecipeMoney();
  908. }
  909. if (this.tableData3.length === 0) this.$emit('clear');
  910. },
  911. // 修改省的数据
  912. proC(e) {
  913. // console.log(e)
  914. this.city = "";
  915. this.area = "";
  916. this.getArea(e, 1);
  917. },
  918. cityC(e) {
  919. this.area = "";
  920. this.getArea(e, 2);
  921. },
  922. // 合并表格
  923. arraySpanMethod({ row, column, rowIndex, columnIndex }) {
  924. // if (!row.name) {
  925. // return [1, 14]
  926. // }
  927. },
  928. submit() {
  929. this.$emit("submit");
  930. },
  931. // 获取包装单位
  932. async _getBzdw() {
  933. let res = await getBzdw();
  934. if (res.ResultCode == 0) {
  935. this.bzdwList = res.Data;
  936. }
  937. },
  938. // 通过中药类型获取药房id
  939. async getPharmacyID() {
  940. return;
  941. let res = await getPharmacyID({
  942. type: "6"
  943. });
  944. if (res.ResultCode == 0) {
  945. if (res.ResultInfo == "") {
  946. this.$message({
  947. showClose: false,
  948. message: "当前类型无法开药,请切换类型",
  949. type: "error"
  950. });
  951. return;
  952. }
  953. this.pharmacyID = res.ResultInfo;
  954. // this.changePharmacy()
  955. this.getPharmacyMsg(res.ResultInfo);
  956. }
  957. },
  958. async customerQuery() {
  959. let res = await customerQuery({
  960. type: 2
  961. });
  962. if (res.ResultCode == 0) {
  963. let pharmacyTypes = [];
  964. let pharmacyTypeGroup = [];
  965. res.Data.forEach(item => {
  966. item.dosageForms = item.dosageForms.split(",");
  967. item.dosageForms.forEach(item1 => {
  968. pharmacyTypes.push({
  969. type: item1,
  970. ptype: item.pid + "@" + item1,
  971. name: item.displayName + (item.dosageForms.length > 1 ? ` (${this.getRadioName(item1)})` : '')
  972. });
  973. });
  974. if (item.dosageForms.length > 1) {
  975. pharmacyTypeGroup.push({
  976. name: item.displayName,
  977. options: item.dosageForms.map(item1 => {
  978. return {
  979. type: item1,
  980. ptype: item.pid + "@" + item1,
  981. name: this.getRadioName(item1),
  982. }
  983. })
  984. })
  985. } else if (item.dosageForms.length === 1) {
  986. pharmacyTypeGroup.push({
  987. name: item.displayName,
  988. options: item.dosageForms.map(item1 => {
  989. return {
  990. type: item1,
  991. ptype: item.pid + "@" + item1,
  992. name: item.displayName,
  993. }
  994. })
  995. })
  996. }
  997. });
  998. this.pharmacyList = res.Data;
  999. this.pharmacyTypes = pharmacyTypes;
  1000. this.pharmacyTypeGroup = pharmacyTypeGroup;
  1001. }
  1002. },
  1003. async changePharmacy(type, val) {
  1004. if (!type) type = this.recipe.lastType || '';
  1005. if (!val) val = this.recipe.radio || '';
  1006. this.recipe.radio = val;
  1007. const loading = this.$loading({
  1008. lock: true,
  1009. text: "处理中,请稍后....",
  1010. spinner: "el-icon-loading",
  1011. background: "rgba(0, 0, 0, 0.7)"
  1012. });
  1013. const drugIds = this.tableData3.filter(item => item.name).map(item => `${ item.medid }&${ item.doce || '' }&${ item.usage || '' }`);
  1014. val = val.split("@")[1];
  1015. type = type.split("@")[1];
  1016. this.recipe.pharmacyID = this.recipe.radio.split("@")[0];
  1017. let params = {
  1018. type: val,
  1019. pharmacyid: this.recipe.pharmacyID,
  1020. drugIds,
  1021. preType: this.recipe.preType,
  1022. oldType: type
  1023. };
  1024. let res = await changePharmacy(params).catch(err => {});
  1025. if (res.ResultCode == 0) {
  1026. for (const item of res.Data) {
  1027. if (typeof item === 'string') {
  1028. const item1 = this.tableData3.find(item1 => item1.medid === item);
  1029. if (item1) item1.color = "red";
  1030. } else if (item && typeof item === 'object') {
  1031. const item1 = this.tableData3.find(item1 => item1.medid === item.oldYpid);
  1032. if (item1) {
  1033. item1.medid = item.pid; // 药品id
  1034. item1.name = item.ypmc;
  1035. item1.spec = item.gg; // 规格
  1036. item1.unit = item.dw; // 单位
  1037. item1.price = item.price;
  1038. item1.inventory = item.kc; // 库存
  1039. item1.originname = item.cdmc; // 产地名称
  1040. if (item.timesQuan) item1.timesQuan = item.timesQuan;
  1041. if (item.timesUnit) item1.timesUnit = item.timesUnit;
  1042. if (item.dose) item1.dose = item.dose;
  1043. if (item.doseUnit) item1.doseUnit = item.doseUnit;
  1044. if (item.usage) item1.usage = item.usage;
  1045. item1.total = item1.price * (item.dose || 0);
  1046. }
  1047. }
  1048. }
  1049. this.tableData3 = this.tableData3.map(item => ({...item}));
  1050. this.recipe.lastType = this.recipe.radio; // 存储这一次的 药房类型
  1051. setTimeout(() => {
  1052. this.countNowRecipeMoney();
  1053. }, 500);
  1054. }
  1055. loading.close();
  1056. },
  1057. async getAddressForHospital() {
  1058. let res = await getAddressForHospital({});
  1059. if (res.ResultCode == 0) {
  1060. this.province = res.Data.province;
  1061. this.city = res.Data.city;
  1062. this.area = res.Data.district;
  1063. this.bottom_form.address = res.Data.adressdetail;
  1064. this.getArea(res.Data.province, 1);
  1065. this.getArea(res.Data.city, 2);
  1066. this.bottom_form.province = res.Data.province;
  1067. this.bottom_form.city = res.Data.city;
  1068. this.bottom_form.area = res.Data.district;
  1069. }
  1070. },
  1071. // 获取表格药品列表
  1072. async getTableDrug(key, page, index, load = true) {
  1073. if (medicineBlurTimer) clearTimeout(medicineBlurTimer);
  1074. if (!load) return;
  1075. let type = this.recipe.radio.split("@")[1];
  1076. let params = {
  1077. key: key,
  1078. limit: 5,
  1079. page: page,
  1080. type,
  1081. pharmacyid: this.recipe.pharmacyID
  1082. };
  1083. let res = await getTableDrug(params);
  1084. if (res.ResultCode == 0) {
  1085. res.Data.Items.filter(item => {
  1086. return (item.price = Number(Number(item.price).toFixed(3)));
  1087. });
  1088. if (page <= res.Data.TotalPageCount) {
  1089. if (page == 1) {
  1090. this.tableData3[index].drugList = res.Data.Items;
  1091. } else {
  1092. this.tableData3[index].drugList = [
  1093. ...this.tableData3[index].drugList,
  1094. ...res.Data.Items
  1095. ];
  1096. this.tableData3[index].page += 1;
  1097. }
  1098. } else if (index >= 0) {
  1099. this.tableData3[index].loadMore = false;
  1100. }
  1101. this.tableData3 = this.tableData3.map(item => ({...item}));
  1102. }
  1103. },
  1104. // 获取省数据
  1105. async getProver() {
  1106. let res = await getProver();
  1107. if (res.ResultCode == 0) {
  1108. this.provinceList = res.Data;
  1109. }
  1110. },
  1111. // 获取市数据
  1112. async getArea(code, type) {
  1113. let res = await getArea(code);
  1114. if (res.ResultCode == 0) {
  1115. if (type == 1) {
  1116. this.cityList = res.Data;
  1117. } else {
  1118. this.areaList = res.Data;
  1119. }
  1120. }
  1121. },
  1122. // 根据表格获取数据类型
  1123. async getSelectType(data, index) {
  1124. let res = await getSelectType(data);
  1125. if (data == "中药制剂药品用法") {
  1126. this.tableData3[index].usageList = res.Data;
  1127. } else if (data == "中药制剂服药时间") {
  1128. this.tableData3[index].timeList = res.Data;
  1129. } else if (data == "中药制剂频次") {
  1130. this.tableData3[index].numList = res.Data;
  1131. }
  1132. },
  1133. // 获取制膏费用
  1134. async getPharmacyMsg(data) {
  1135. let res = await getPharmacyMsg(data);
  1136. if (res.ResultCode == 0) {
  1137. this.moneyMsg = res.Data;
  1138. }
  1139. },
  1140. // 获取患者地址信息
  1141. async getPatAddress() {
  1142. if (!this.getPatiensInfo.basisPatient.pid) return;
  1143. let res = await getPatAddress({
  1144. patId: this.getPatiensInfo.basisPatient.pid
  1145. });
  1146. if (res.ResultCode == 0) {
  1147. this.bottom_form.address = res.Data.detailadress;
  1148. this.bottom_form.savename = res.Data.name;
  1149. this.bottom_form.phone = res.Data.phone;
  1150. this.province = res.Data.province;
  1151. this.city = res.Data.city;
  1152. this.area = res.Data.district;
  1153. this.getArea(res.Data.province, 1);
  1154. this.getArea(res.Data.city, 2);
  1155. }
  1156. },
  1157. // 获取医共体计算方式配置
  1158. async getDataByKey(key = "automaticReview") {
  1159. /*
  1160. countMenthod:计费方式
  1161. automaticReview:是否开启自动审核
  1162. */
  1163. let res = await getDataByKey({
  1164. key: key,
  1165. organizationid: this.getuserinfo.organizationid
  1166. });
  1167. if (res.ResultCode == 0) {
  1168. if (key == "countMenthod") {
  1169. if (res.ResultInfo == "0") {
  1170. this.countWay = "1";
  1171. } else if (res.ResultInfo == "1") {
  1172. this.countWay = "2";
  1173. } else if (res.ResultInfo == "2") {
  1174. this.countWay = "3";
  1175. }
  1176. }
  1177. if (key == "automaticReview") {
  1178. this.isAutoCheck = res.ResultInfo;
  1179. }
  1180. }
  1181. }
  1182. },
  1183. computed: {
  1184. editable() {
  1185. switch (+this.isAutoCheck) {
  1186. case 0:
  1187. /**
  1188. * v-if="isAutoCheck==0"
  1189. * v-if="prescribed==0 || !prescribed"
  1190. * 保存处方
  1191. */
  1192. return +this.prescribed === 0
  1193. case 1:
  1194. /**
  1195. * v-if="isAutoCheck==1"
  1196. * v-if="paystate==0 || !paystate"
  1197. * 保存处方
  1198. */
  1199. return +this.paystate === 0
  1200. default:
  1201. return false
  1202. }
  1203. },
  1204. saveable() /* 父组件 获取 */ {
  1205. return this.editable && this.tableData3.some(item => item.name)
  1206. },
  1207. ...mapGetters(["getuserinfo", "getPatiensInfo"])
  1208. }
  1209. };
  1210. </script>
  1211. <style lang="scss" scoped>
  1212. .t-con-radio {
  1213. flex: 1;
  1214. padding-bottom: 5px;
  1215. border-bottom: 1px solid #eaeaea;
  1216. ::v-deep .el-radio__label {
  1217. font-size: 16px;
  1218. }
  1219. }
  1220. .t-radio-title {
  1221. width: 82px;
  1222. font-size: 16px;
  1223. font-family: PingFang SC;
  1224. font-weight: 400;
  1225. color: #333333;
  1226. }
  1227. .t-radio-group {
  1228. flex: 1;
  1229. }
  1230. .t-radio-group2 {
  1231. padding: 4px 8px;
  1232. &.multiple {
  1233. border: 2px dashed #5386f6;
  1234. > label:first-of-type {
  1235. margin-right: 8px;
  1236. color: rgba(0, 0, 0, 0.6);
  1237. &:after {
  1238. margin-left: 2px;
  1239. content: ":";
  1240. }
  1241. }
  1242. }
  1243. }
  1244. </style>
  1245. <style lang="scss" scoped>
  1246. @import "../style/common.scss";
  1247. .center-table {
  1248. border: 2px solid #dedede;
  1249. padding: 7px 0 0;
  1250. // min-height: 600px;
  1251. // position: relative;
  1252. .table-header {
  1253. padding-bottom: 7px;
  1254. border-bottom: 2px solid #dedede;
  1255. .table-label {
  1256. .label-item {
  1257. cursor: pointer;
  1258. width: 134px;
  1259. border-right: 2px solid #eaeaea;
  1260. div {
  1261. color: #666;
  1262. transform: rotate(45deg);
  1263. font-size: 28px;
  1264. margin-left: 12px;
  1265. margin-top: 1px;
  1266. }
  1267. }
  1268. span {
  1269. font-size: 14px;
  1270. font-family: PingFang SC;
  1271. font-weight: 400;
  1272. color: #666666;
  1273. }
  1274. .l_active {
  1275. color: #5386f6;
  1276. }
  1277. }
  1278. }
  1279. .add-presc {
  1280. width: 70px;
  1281. height: 26px;
  1282. background: #ffae45;
  1283. border-radius: 4px;
  1284. font-size: 12px;
  1285. font-family: PingFang SC;
  1286. font-weight: 400;
  1287. color: #ffffff;
  1288. cursor: pointer;
  1289. margin-right: 20px;
  1290. }
  1291. .table-show {
  1292. width: 100%;
  1293. // background: #5386F6;
  1294. // overflow: hidden;
  1295. .table-left-body {
  1296. width: 49.5%;
  1297. position: relative;
  1298. perspective: 100px;
  1299. padding-bottom: 53px;
  1300. }
  1301. .table-left {
  1302. width: 100%;
  1303. overflow-y: auto;
  1304. border: 1px solid #dedede;
  1305. box-sizing: border-box;
  1306. .table-l-hader {
  1307. white-space: nowrap;
  1308. div {
  1309. display: inline-block;
  1310. // padding: 15px 10px;
  1311. background: #f3fffb;
  1312. text-align: center;
  1313. height: 48px;
  1314. line-height: 48px;
  1315. border: 1px solid #dedede;
  1316. border-bottom: 0 !important;
  1317. // border-top: 0 !important;
  1318. }
  1319. .med-name {
  1320. margin-left: 50px;
  1321. }
  1322. .kucun {
  1323. padding-right: 120px;
  1324. }
  1325. .fixed-r {
  1326. position: fixed;
  1327. right: 0;
  1328. }
  1329. .fixed-left {
  1330. position: fixed;
  1331. left: 0;
  1332. }
  1333. }
  1334. .table-l-item {
  1335. white-space: nowrap;
  1336. .bg-green {
  1337. .div1 {
  1338. background: #f3fffb;
  1339. border: 1px solid #dedede;
  1340. }
  1341. }
  1342. .div1 {
  1343. display: inline-block;
  1344. // padding: 15px 10px;
  1345. background: #ffffff;
  1346. text-align: center;
  1347. height: 53px;
  1348. line-height: 53px;
  1349. border: 1px solid #dedede;
  1350. z-index: 9999;
  1351. border-top: 0 !important;
  1352. }
  1353. .med-name {
  1354. margin-left: 50px;
  1355. }
  1356. .kucun {
  1357. padding-right: 120px;
  1358. border-right: 1px solid #dedede;
  1359. }
  1360. .fixed-r {
  1361. position: fixed;
  1362. right: 0;
  1363. }
  1364. .fixed-left {
  1365. position: fixed;
  1366. left: 0;
  1367. // border-left: 1px solid #DEDEDE;
  1368. }
  1369. .no-data {
  1370. width: 100%;
  1371. box-sizing: border-box;
  1372. // border-top: 1px solid #DEDEDE;
  1373. position: relative;
  1374. left: 0;
  1375. right: 0;
  1376. bottom: 0px;
  1377. // float: left;
  1378. }
  1379. }
  1380. }
  1381. }
  1382. .operate {
  1383. width: 100%;
  1384. height: 100%;
  1385. display: flex;
  1386. align-items: center;
  1387. justify-content: space-around;
  1388. img {
  1389. width: 16px;
  1390. }
  1391. }
  1392. .operate2 {
  1393. position: absolute;
  1394. z-index: 99;
  1395. }
  1396. .bottom-input {
  1397. background: #fff;
  1398. padding: 12.5px 30px 12.5px 52px;
  1399. position: relative;
  1400. // z-index: 999;
  1401. // perspective: 100px;
  1402. .div {
  1403. width: 154px;
  1404. }
  1405. .table-choose {
  1406. z-index: 9999;
  1407. width: 332px;
  1408. height: 221px;
  1409. background: #ffffff;
  1410. border: 2px solid #d8d8d8;
  1411. position: relative;
  1412. top: 2px;
  1413. left: -48px;
  1414. overflow: auto;
  1415. .table-choose-h {
  1416. background: #f3fffb;
  1417. div {
  1418. height: 36px;
  1419. width: 73px;
  1420. }
  1421. div:first-child {
  1422. width: 115px;
  1423. }
  1424. }
  1425. .t-c-b {
  1426. cursor: pointer;
  1427. height: 180px;
  1428. .td {
  1429. background: #f3fffb;
  1430. }
  1431. p {
  1432. border: 1px solid #ededed;
  1433. height: 36px;
  1434. width: 73px;
  1435. // flex: 1;
  1436. box-sizing: border-box;
  1437. }
  1438. p:first-child {
  1439. width: 115px;
  1440. }
  1441. }
  1442. }
  1443. }
  1444. .table-bottom {
  1445. // position: absolute;
  1446. // bottom: 0;
  1447. // right: 0;
  1448. // left: 0;\
  1449. padding: 0 5px;
  1450. margin-top: 10px;
  1451. // margin-top: 66px;
  1452. .header-about {
  1453. .item {
  1454. margin-right: 8px;
  1455. margin-bottom: 8px;
  1456. span {
  1457. font-size: 14px;
  1458. font-family: PingFang SC;
  1459. font-weight: 400;
  1460. color: #333333;
  1461. }
  1462. .div1 {
  1463. width: 100px;
  1464. }
  1465. .div2 {
  1466. width: 74px;
  1467. }
  1468. .city1 {
  1469. width: 120px;
  1470. }
  1471. .div3 {
  1472. width: 92px;
  1473. }
  1474. .div4 {
  1475. width: 160px;
  1476. }
  1477. .input-suffix {
  1478. line-height: 36px;
  1479. }
  1480. }
  1481. .right {
  1482. width: 70px;
  1483. height: 26px;
  1484. background: #ffae45;
  1485. border-radius: 4px;
  1486. font-size: 14px;
  1487. font-family: PingFang SC;
  1488. font-weight: 400;
  1489. color: #ffffff;
  1490. margin-bottom: 10px;
  1491. cursor: pointer;
  1492. }
  1493. }
  1494. }
  1495. .table-b-bottom {
  1496. padding: 5px 5px;
  1497. border-top: 2px solid #dedede;
  1498. margin-top: 10px;
  1499. .t-b-l-item {
  1500. font-size: 16px;
  1501. font-family: PingFang SC;
  1502. font-weight: 400;
  1503. color: #333333;
  1504. margin-right: 20px;
  1505. span {
  1506. color: #ff6245;
  1507. }
  1508. }
  1509. .t-b-b-right {
  1510. div {
  1511. width: 130px;
  1512. height: 46px;
  1513. background: #ffae45;
  1514. border-radius: 4px;
  1515. font-size: 16px;
  1516. font-family: PingFang SC;
  1517. font-weight: 500;
  1518. color: #ffffff;
  1519. cursor: pointer;
  1520. }
  1521. .bg-green {
  1522. background: #5386f6;
  1523. margin-left: 20px;
  1524. }
  1525. }
  1526. }
  1527. // 中成药 和适宜技术配方
  1528. .chinese_medicine {
  1529. padding: 5px 5px 0;
  1530. .clearer {
  1531. width: 84px;
  1532. height: 28px;
  1533. background: #ffae45;
  1534. border-radius: 4px;
  1535. font-size: 14px;
  1536. font-family: PingFang SC;
  1537. font-weight: bold;
  1538. color: #ffffff;
  1539. cursor: pointer;
  1540. margin-bottom: 5px;
  1541. // float: right;
  1542. }
  1543. .c-m-table {
  1544. width: 100%;
  1545. // overflow: hidden;
  1546. // border: 1px solid #dedede;
  1547. // height: 336px;
  1548. // overflow: auto;
  1549. .table-body {
  1550. border: 1px solid #dedede;
  1551. overflow: auto;
  1552. }
  1553. .unit {
  1554. font-size: 14px;
  1555. font-family: PingFang SC;
  1556. font-weight: 400;
  1557. color: #000000;
  1558. // margin-left: 10px;
  1559. }
  1560. .input {
  1561. width: 60px;
  1562. }
  1563. }
  1564. }
  1565. }
  1566. .table-show {
  1567. width: 100%;
  1568. // background: #5386F6;
  1569. // overflow: hidden;
  1570. .table-left-body {
  1571. width: 49.5%;
  1572. position: relative;
  1573. perspective: 100px;
  1574. padding-bottom: 53px;
  1575. }
  1576. .table-left {
  1577. width: 100%;
  1578. overflow-y: auto;
  1579. border: 1px solid #dedede;
  1580. box-sizing: border-box;
  1581. .table-l-hader {
  1582. white-space: nowrap;
  1583. div {
  1584. display: inline-block;
  1585. // padding: 15px 10px;
  1586. background: #f3fffb;
  1587. text-align: center;
  1588. height: 48px;
  1589. line-height: 48px;
  1590. border: 1px solid #dedede;
  1591. border-bottom: 0 !important;
  1592. // border-top: 0 !important;
  1593. }
  1594. .med-name {
  1595. margin-left: 50px;
  1596. }
  1597. .kucun {
  1598. padding-right: 120px;
  1599. }
  1600. .fixed-r {
  1601. position: fixed;
  1602. right: 0;
  1603. }
  1604. .fixed-left {
  1605. position: fixed;
  1606. left: 0;
  1607. }
  1608. }
  1609. .table-l-item {
  1610. white-space: nowrap;
  1611. .bg-green {
  1612. .div1 {
  1613. background: #f3fffb;
  1614. border: 1px solid #dedede;
  1615. }
  1616. }
  1617. .div1 {
  1618. display: inline-block;
  1619. // padding: 15px 10px;
  1620. background: #ffffff;
  1621. text-align: center;
  1622. height: 53px;
  1623. line-height: 53px;
  1624. border: 1px solid #dedede;
  1625. z-index: 9999;
  1626. border-top: 0 !important;
  1627. }
  1628. .med-name {
  1629. margin-left: 50px;
  1630. }
  1631. .kucun {
  1632. padding-right: 120px;
  1633. border-right: 1px solid #dedede;
  1634. }
  1635. .fixed-r {
  1636. position: fixed;
  1637. right: 0;
  1638. }
  1639. .fixed-left {
  1640. position: fixed;
  1641. left: 0;
  1642. // border-left: 1px solid #DEDEDE;
  1643. }
  1644. .no-data {
  1645. width: 100%;
  1646. box-sizing: border-box;
  1647. // border-top: 1px solid #DEDEDE;
  1648. position: relative;
  1649. left: 0;
  1650. right: 0;
  1651. bottom: 0px;
  1652. // float: left;
  1653. }
  1654. }
  1655. }
  1656. }
  1657. .table-show::v-deep .el-table .cell {
  1658. text-align: center;
  1659. padding: 0 0;
  1660. }
  1661. .operate {
  1662. width: 100%;
  1663. height: 100%;
  1664. display: flex;
  1665. align-items: center;
  1666. justify-content: space-around;
  1667. img {
  1668. width: 16px;
  1669. }
  1670. }
  1671. .bottom-input {
  1672. background: #fff;
  1673. padding: 12.5px 30px 12.5px 52px;
  1674. position: relative;
  1675. // z-index: 999;
  1676. // perspective: 100px;
  1677. .div {
  1678. width: 154px;
  1679. }
  1680. .table-choose {
  1681. z-index: 9999;
  1682. width: 332px;
  1683. height: 221px;
  1684. background: #ffffff;
  1685. border: 2px solid #d8d8d8;
  1686. position: relative;
  1687. top: 2px;
  1688. left: -48px;
  1689. overflow: auto;
  1690. .table-choose-h {
  1691. background: #f3fffb;
  1692. div {
  1693. height: 36px;
  1694. width: 73px;
  1695. }
  1696. div:first-child {
  1697. width: 115px;
  1698. }
  1699. }
  1700. .t-c-b {
  1701. cursor: pointer;
  1702. height: 180px;
  1703. .td {
  1704. background: #f3fffb;
  1705. }
  1706. p {
  1707. border: 1px solid #ededed;
  1708. height: 36px;
  1709. width: 73px;
  1710. // flex: 1;
  1711. box-sizing: border-box;
  1712. }
  1713. p:first-child {
  1714. width: 115px;
  1715. }
  1716. }
  1717. }
  1718. }
  1719. .table-bottom {
  1720. // position: absolute;
  1721. // bottom: 0;
  1722. // right: 0;
  1723. // left: 0;\
  1724. padding: 0 37px;
  1725. margin-top: 241px;
  1726. .header-about {
  1727. .item {
  1728. margin-right: 20px;
  1729. margin-bottom: 10px;
  1730. span {
  1731. font-size: 16px;
  1732. font-family: PingFang SC;
  1733. font-weight: 400;
  1734. color: #333333;
  1735. }
  1736. .div1 {
  1737. width: 120px;
  1738. }
  1739. .div2 {
  1740. width: 74px;
  1741. }
  1742. .city1 {
  1743. width: 120px;
  1744. }
  1745. .div3 {
  1746. width: 92px;
  1747. }
  1748. .div4 {
  1749. width: 160px;
  1750. }
  1751. .input-suffix {
  1752. line-height: 36px;
  1753. }
  1754. }
  1755. .right {
  1756. width: 70px;
  1757. height: 26px;
  1758. background: #ffae45;
  1759. border-radius: 4px;
  1760. font-size: 14px;
  1761. font-family: PingFang SC;
  1762. font-weight: 400;
  1763. color: #ffffff;
  1764. margin-bottom: 10px;
  1765. cursor: pointer;
  1766. }
  1767. }
  1768. }
  1769. .table-b-bottom {
  1770. padding: 10px 27px;
  1771. border-top: 2px solid #dedede;
  1772. margin-top: 10px;
  1773. .t-b-l-item {
  1774. font-size: 16px;
  1775. font-family: PingFang SC;
  1776. font-weight: 400;
  1777. color: #333333;
  1778. margin-right: 20px;
  1779. span {
  1780. color: #ff6245;
  1781. }
  1782. }
  1783. .t-b-b-right {
  1784. div {
  1785. width: 130px;
  1786. height: 46px;
  1787. background: #ffae45;
  1788. border-radius: 4px;
  1789. font-size: 16px;
  1790. font-family: PingFang SC;
  1791. font-weight: 500;
  1792. color: #ffffff;
  1793. cursor: pointer;
  1794. }
  1795. .bg-green {
  1796. background: #5386f6;
  1797. margin-left: 20px;
  1798. }
  1799. }
  1800. }
  1801. .table-choose3 {
  1802. z-index: 99;
  1803. // width: 332px;
  1804. width: 532px;
  1805. height: 221px;
  1806. background: #ffffff;
  1807. border: 2px solid #d8d8d8;
  1808. position: fixed;
  1809. //top: 44px;
  1810. //left: 84px;
  1811. //margin-top: 19px;
  1812. overflow: auto;
  1813. .table-choose-h {
  1814. background: rgba($color: #5386f6, $alpha: 0.1);
  1815. div {
  1816. height: 36px;
  1817. width: 73px;
  1818. }
  1819. div:first-child {
  1820. width: 115px;
  1821. }
  1822. div:nth-child(2),
  1823. div:nth-child(3) {
  1824. width: 173px;
  1825. }
  1826. }
  1827. .t-c-b {
  1828. cursor: pointer;
  1829. height: 180px;
  1830. .td {
  1831. background: rgba($color: #5386f6, $alpha: 0.1);
  1832. }
  1833. p {
  1834. border: 1px solid #ededed;
  1835. height: 36px;
  1836. width: 73px;
  1837. // flex: 1;
  1838. box-sizing: border-box;
  1839. }
  1840. p:first-child {
  1841. width: 115px;
  1842. }
  1843. p:nth-child(2),
  1844. p:nth-child(3) {
  1845. width: 173px;
  1846. }
  1847. }
  1848. }
  1849. .collapse ::v-deep .el-collapse-item__content {
  1850. padding-bottom: 5px;
  1851. }
  1852. .c-m-table::v-deep .el-table .cell {
  1853. text-align: center;
  1854. }
  1855. .table-show::v-deep .el-table .cell {
  1856. text-align: center;
  1857. }
  1858. .c-m-table::v-deep .el-select input {
  1859. padding: 0 15px 0 5px;
  1860. }
  1861. .table-show ::v-deep .el-select input {
  1862. padding: 0 15px 0 5px;
  1863. }
  1864. .t_dose::v-deep .el-input__inner {
  1865. // text-align: left;
  1866. padding: 0 5px !important;
  1867. }
  1868. .city::v-deep .el-select input {
  1869. padding: 0 20px 0 10px;
  1870. // height: 32px;
  1871. }
  1872. .xuewei::v-deep .el-select {
  1873. width: 100%;
  1874. }
  1875. .c-m-table::v-deep .el-table td {
  1876. padding: 2px 0;
  1877. }
  1878. .c-m-table::v-deep .el-table th {
  1879. padding: 2px 0;
  1880. }
  1881. .header-about::v-deep .el-checkbox {
  1882. margin-right: 5px;
  1883. }
  1884. .header-about::v-deep .el-checkbox__label {
  1885. padding-left: 5px;
  1886. }
  1887. .daijiao-check {
  1888. margin-right: 8px;
  1889. .img-body {
  1890. width: 16px;
  1891. height: 16px;
  1892. box-sizing: border-box;
  1893. border: 1px solid #dcdfe6;
  1894. font-size: 0;
  1895. img {
  1896. width: 14px;
  1897. height: 14px;
  1898. }
  1899. }
  1900. .active {
  1901. border: 0px solid #5386f6;
  1902. img {
  1903. width: 17px;
  1904. height: 17px;
  1905. }
  1906. }
  1907. span {
  1908. font-size: 14px;
  1909. margin-left: 5px;
  1910. cursor: pointer;
  1911. }
  1912. }
  1913. </style>
  1914. <style lang="scss" scoped>
  1915. @media screen and (max-width: 768px) {
  1916. .center-table .chinese_medicine .clearer {
  1917. height: 24px;
  1918. }
  1919. .c-m-table ::v-deep .el-table th {
  1920. font-size: 12px;
  1921. }
  1922. .c-m-table ::v-deep .el-table td {
  1923. font-size: 12px;
  1924. }
  1925. .center-table .table-bottom .header-about .item span {
  1926. font-size: 12px;
  1927. }
  1928. .center-table .table-b-bottom .t-b-l-item {
  1929. font-size: 12px;
  1930. }
  1931. .center-table .chinese_medicine .c-m-table .table-body {
  1932. min-height: 360px;
  1933. }
  1934. }
  1935. </style>