MedicineAndChina.vue 57 KB

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