| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261 |
- <template>
- <div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="68px"
- >
- <div class="query-box">
- <div class="query-box__left">
- <el-form-item label="" prop="yljgId">
- <el-select
- v-model="queryParams.yljgId"
- placeholder="请选择医疗机构"
- class="defwidth"
- >
- <el-option
- v-for="item in listMedicalMechanismArr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- :disabled="item.state == 1 ? false : true"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="" prop="thirdPartState">
- <el-select v-model="queryParams.thirdPartState" placeholder="三方状态"
- style="width:160px">
- <el-option
- v-for="item in thirdPartStateArr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item label="" prop="preMzZy">
- <el-select
- v-model="queryParams.preMzZy"
- placeholder="门诊/住院"
- style="width: 120px"
- >
- <el-option
- v-for="item in preMzZyArr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="checkState">
- <el-select
- v-model="queryParams.checkState"
- placeholder="审核状态"
- style="width: 160px"
- >
- <el-option
- v-for="item in checkStateArr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="isPrint">
- <el-select
- v-model="queryParams.isPrint"
- placeholder="打印状态"
- style="width: 160px"
- >
- <el-option
- v-for="item in isPrintArr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="isBehalf">
- <el-select
- v-model="queryParams.isBehalf"
- placeholder="是否代煎"
- style="width: 160px"
- >
- <el-option
- v-for="item in isBehalfArr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="" prop="preNo">
- <el-input
- v-model="queryParams.preNo"
- class="defwidth"
- placeholder="请输入处方号"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="" prop="name">
- <el-input
- v-model="queryParams.name"
- placeholder="请输入患者姓名"
- class="defwidth"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="" prop="prescriptionTime">
- <el-date-picker
- style="width: 240px"
- clearable
- class="defwidth"
- size="small"
- v-model="queryParams.prescriptionTime"
- type="daterange"
- value-format="yyyy-MM-dd"
- start-placeholder="开方开始时间"
- end-placeholder="开方结束时间"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button
- type="primary"
- icon="el-icon-search"
- size="mini"
- @click="handleQuery"
- >搜索</el-button
- >
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- <el-button icon="el-icon-circle-plus-outline" v-hasPermi="['rescription:prescriptionCore:add']" size="mini" @click="handleUpdate(2, {});recipeEditMode='edit';">新增处方</el-button>
- </el-form-item>
- </div>
- </div>
- </el-form>
- <el-table
- v-loading="loading"
- :data="prescriptionCoreList"
- @selection-change="handleSelectionChange"
- border
- size="mini"
- class="prescriptionCore"
- :row-class-name="tableRowClassName"
- >
- <el-table-column type="index" width="55" align="center" label="序号" />
- <el-table-column label="处方号" align="center" prop="preNo" />
- <el-table-column label="医疗机构" align="center" prop="yijgName" show-overflow-tooltip/>
- <el-table-column label="就诊科室" align="center" prop="department" show-overflow-tooltip/>
- <el-table-column label="开方医生" align="center" prop="doctor" />
- <el-table-column label="患者姓名" align="center" prop="name" />
- <el-table-column label="性别" align="center" prop="sex" />
- <el-table-column label="审核状态" align="center" prop="checkState">
- <template slot-scope="scope">
- {{ {0: '待审核', 1: '审核通过', 2: '审核未通过',}[scope.row.checkState] }}
- </template>
- </el-table-column>
- <el-table-column label="是否代煎" align="center" prop="isBehalf">
- <template slot-scope="scope">
- {{ {0: '否', 1: '是'}[scope.row.isBehalf] }}
- </template>
- </el-table-column>
- <el-table-column label="配送方式" align="center" prop="expressExecutor" />
- <el-table-column label="收件地址" align="center" prop="address" show-overflow-tooltip/>
- <el-table-column label="门诊/住院" align="center" prop="preMzZy">
- <template slot-scope="scope">{{
- scope.row.preMzZy == 1 ? "门诊" : "住院"
- }}</template>
- </el-table-column>
- <el-table-column label="审核人" align="center" prop="checkBy" />
- <el-table-column label="审核时间" align="center" prop="checkTime" />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- width="240"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="primary"
- style="width: 40px"
- @click="handleUpdate(1, scope.row)"
- v-hasPermi="['rescription:prescriptionCore:query']"
- >详情</el-button
- >
- <el-button
- size="mini"
- type="primary"
- style="width: 40px"
- v-if="scope.row.checkState == 0"
- @click="handleUpdate(2, scope.row);recipeEditMode='check';"
- v-hasPermi="['rescription:prescriptionCore:check']"
- >审核</el-button
- >
- <el-button
- size="mini"
- type="primary"
- style="width: 40px"
- v-if="scope.row.checkState == 1"
- @click="handleUpdate(2, scope.row);recipeEditMode='edit';"
- v-hasPermi="['rescription:prescriptionCore:add']"
- >复制</el-button
- >
- <el-button
- size="mini"
- class="printbtn"
- style="width: 40px"
- @click="getRemark(scope.row)"
- >备注</el-button
- >
- <el-button
- size="mini"
- class="printbtn"
- style="width: 40px"
- @click="showPrintContentMethod(scope.row)"
- v-if="scope.row.checkState == 1"
- >打印</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改处方审核对话框 -->
- <el-dialog
- :title="title"
- :visible.sync="open"
- width="1280px"
- append-to-body
- >
- <div class="display_f">
- <div class="_left">
- <div style="display: flex; align-items: center; margin-bottom: 20px">
- <h3>处方信息</h3>
- <div style="margin: 0 0 0 30px">处方号:{{ detailData.preNo }}</div>
- <div v-if="detailData.tzqyflag==1 && detailData.thread!=175" style="margin: 0 0 0 30px;color: red;">待取药</div>
- </div>
- <div style="display: flex; align-items: center">
- <h3>审核状态:</h3>
- <span
- style="color: #fff"
- :class="
- detailData.checkState == 0
- ? 'yellow-btn'
- : detailData.checkState == 1
- ? 'green-btn'
- : detailData.checkState == 2
- ? 'red-btn'
- : ''
- "
- >{{
- detailData.checkState == 0
- ? "待审核"
- : detailData.checkState == 1
- ? "审核通过"
- : detailData.checkState == 2
- ? "审核不通过"
- : ""
- }}</span
- >
- <h3 style="margin-left: 50px">审核人:</h3>
- <span>{{ detailData.checkBy }}</span>
- <h3 style="margin-left: 50px">审核时间:</h3>
- <span>{{ detailData.checkTime }}</span>
- </div>
- <el-divider></el-divider>
- <el-row :gutter="20">
- <el-col :span="24">
- <el-descriptions title="" :column="5">
- <el-descriptions-item label="患者姓名">{{
- detailData.name
- }}</el-descriptions-item>
- <el-descriptions-item label="性别">{{
- detailData.sex
- }}</el-descriptions-item>
- <el-descriptions-item label="年龄">{{
- detailData.age
- }}</el-descriptions-item>
- <el-descriptions-item label="科室">{{
- detailData.department
- }}</el-descriptions-item>
- <el-descriptions-item label="病床">{{
- detailData.bedNo||''
- }}</el-descriptions-item>
- <el-descriptions-item label="临床诊断">
- {{ detailData.disName }}
- <!-- -{{ detailData.symName }} -->
- </el-descriptions-item>
- <el-descriptions-item label="开方医生">{{
- detailData.doctor
- }}</el-descriptions-item>
- <el-descriptions-item label="处方类型">{{
- detailData.type == 1 ? "中药处方" : "中药制剂"
- }}</el-descriptions-item>
- <el-descriptions-item label="发药状态">{{
- detailData.fyState == 0
- ? "未发药"
- : detailData.fyState == 1
- ? "已发药"
- : "取消发药"
- }}</el-descriptions-item>
- <el-descriptions-item label="煎药方式"
- >{{
- detailData.oralPre && detailData.oralPre.decoctingMethod
- }}
- <span
- v-if="
- detailData.oralPre &&
- detailData.oralPre.decoctingMethod == '浓煎'
- "
- >{{
- detailData.oralPre && detailData.oralPre.concentration
- }}</span
- ></el-descriptions-item
- >
- <el-descriptions-item label="处方金额">{{
- detailData.type == 1
- ? detailData.oralPre && detailData.oralPre.prescriptionSum
- : detailData.solidPre && detailData.solidPre.prescriptionSum
- }}</el-descriptions-item>
- <el-descriptions-item label="剂型">{{
- detailData.oralPre && detailData.oralPre.dosageForm
- }}</el-descriptions-item>
- <el-descriptions-item label="剂数">{{
- detailData.oralPre && detailData.oralPre.number
- }}</el-descriptions-item>
- <el-descriptions-item label="代煎剂数">{{
- detailData.oralPre && detailData.oralPre.daijianNumber
- }}</el-descriptions-item>
- <el-descriptions-item label="代煎费用">{{
- detailData.oralPre && detailData.oralPre.daijianCost
- }}</el-descriptions-item>
- <el-descriptions-item label="处方用法">{{
- detailData.oralPre && detailData.oralPre.prescriptionusage
- }}</el-descriptions-item>
- <el-descriptions-item label="服药时间">{{
- detailData.oralPre && detailData.oralPre.medicationTime
- }}</el-descriptions-item>
- <el-descriptions-item label="频次">{{
- detailData.oralPre && detailData.oralPre.frequency
- }}</el-descriptions-item>
- <el-descriptions-item label="快递单号">{{
- detailData.expressCode
- }}</el-descriptions-item>
- <el-descriptions-item label="是否代煎">{{
- detailData.isBehalf == 0
- ? "否"
- : detailData.isBehalf == 1
- ? "是"
- : "未知"
- }}</el-descriptions-item>
- <el-descriptions-item label="配送费用">{{
- detailData.oralPre && detailData.oralPre.distributionCost
- }}</el-descriptions-item>
- <el-descriptions-item label="总金额">{{
- detailData.oralPre && detailData.oralPre.prescriptionTotleSum
- }}</el-descriptions-item>
- <el-descriptions-item label="嘱托">{{
- detailData.oralPre && detailData.oralPre.entrust
- }}</el-descriptions-item>
- </el-descriptions>
- <el-descriptions :column="5">
- <el-descriptions-item label="是否配送">{{
- detailData.takingMethod == 0
- ? "否"
- : detailData.takingMethod == 1
- ? "是"
- : "未知"
- }}</el-descriptions-item>
- <el-descriptions-item label="收件人">{{
- detailData.consignee
- }}</el-descriptions-item>
- <el-descriptions-item label="收货电话">{{
- detailData.contactNumber
- }}</el-descriptions-item>
- <el-descriptions-item label="收货地址">{{
- detailData.address
- }}</el-descriptions-item>
- </el-descriptions>
- <el-descriptions :column="5">
- <el-descriptions-item label="开方医生备注">{{
- detailData.extendedTxt
- }}</el-descriptions-item>
- </el-descriptions>
- <el-descriptions :column="5">
- <el-descriptions-item label="药师备注">{{
- detailData.pharmacistsremarks
- }}</el-descriptions-item>
- </el-descriptions>
- </el-col>
- <el-col :span="24">
- <el-table
- v-loading="loading"
- :data="detailData && detailData.oralPreItemList"
- @selection-change="handleSelectionChange"
- max-height="390"
- >
- <el-table-column type="index" width="55" align="center" />
- <el-table-column
- label="药品名称"
- align="center"
- prop="matName"
- />
- <el-table-column
- label="药品规格"
- align="center"
- prop="ypggCenter"
- />
- <el-table-column
- label="单位"
- align="center"
- prop="matUnitName"
- />
- <el-table-column
- label="用法"
- align="center"
- prop="matUsageName"
- />
- <el-table-column label="剂量" align="center" prop="matDose" />
- <el-table-column label="零售价" align="center" prop="matXsj" />
- <el-table-column label="产地" align="center" prop="matOrigin" />
- <el-table-column
- label="小计"
- align="center"
- prop="subtotalMoney"
- />
- </el-table>
- </el-col>
- </el-row>
- <div style="margin-top: 50px" v-if="btnState === 2">
- <span>备注</span>
- <el-input
- placeholder="请输入拒绝原因"
- style="margin-left: 13px; width: 800px"
- v-model="remarks"
- ></el-input>
- </div>
- </div>
- <!-- 安全合理用药检测 -->
- <div class="pre-title mr-t10 _right">
- <div class="flex-vertical-center-l title-container">
- <div>智能审方</div>
- </div>
- <div class="patiens-msg mr-t10" v-if="rationalMed.length > 0">
- <div class="p" v-if="raDoseShow">
- <div class="patiens-cate">超剂量药品:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed10"
- :key="index"
- >
- <span v-if="item.showDose">
- <span class="matname">{{ item.matname }}</span>
- <span style="color: red"
- >({{ item.matmindosage }}-{{ item.matmaxdosage }})</span
- >
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed2.length > 0">
- <div class="patiens-cate">慎忌禁用药:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed2"
- :key="index"
- >
- <span v-if="item.matsjj">
- <span class="matname">{{ item.matname }}</span>
- ({{ item.matsjj | ftsjj }})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed3.length > 0">
- <div class="patiens-cate">孕妇慎忌禁:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed3"
- :key="index"
- >
- <span v-if="item.matyfsjj">
- <span class="matname">{{ item.matname }}</span>
- <span :style="{ color: item.matyfsj == 3 ? 'red' : '' }"
- >({{ item.matyfsjj | fyfsjj }})</span
- >
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed4.length > 0">
- <div class="patiens-cate">服药饮食禁忌:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed4"
- :key="index"
- >
- <span v-if="item.matysjj">
- <span class="matname">{{ item.matname }}</span>
- ({{ item.matysjj ? item.matysjj : "无" }})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed5.length > 0">
- <div class="patiens-cate">药物毒性说明:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed5"
- :key="index"
- >
- <span v-if="item.matdxsm">
- <span class="matname" style="color: red">{{
- item.matname
- }}</span>
- ({{ item.matdxsm ? item.matdxsm : "无" }})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed6.length > 0">
- <div class="patiens-cate">病证用药禁忌:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed6"
- :key="index"
- >
- <span v-if="item.matbzjj">
- <span class="matname">{{ item.matname }}</span>
- ({{ item.matbzjj ? item.matbzjj : "无" }})
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed7.length > 0">
- <div class="patiens-cate">十八反:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed7"
- :key="index"
- >
- <span v-if="item.matsbf">
- <span style="color: red">{{ item.matname }}</span>
- 反{{ item.matsbf }}
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed8.length > 0">
- <div class="patiens-cate">十九畏:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed8"
- :key="index"
- >
- <span v-if="item.matsjw">
- <span style="color: red">{{ item.matname }}</span>
- 畏{{ item.matsjw }}
- </span>
- </div>
- </div>
- <div class="p" v-if="rationalMed9.length > 0">
- <div class="patiens-cate">用药不宜:</div>
- <div
- class="patiens-desc"
- v-for="(item, index) in rationalMed9"
- :key="index"
- >
- <span v-if="item.matby">{{
- fmatby(item.matby, item.matname)
- }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="checkBtn(1)" v-if="btnState === 2"
- >通 过</el-button
- >
- <el-popover placement="top" width="160" v-model="visible">
- <p>不通过理由未输入,确定现在提交?</p>
- <div style="text-align: right; margin: 0">
- <el-button size="mini" type="text" @click="visible = false"
- >取消</el-button
- >
- <el-button type="primary" size="mini" @click="checkBtn(2)"
- >确定</el-button
- >
- </div>
- <el-button
- slot="reference"
- v-if="btnState === 2"
- @click="remarks ? checkBtn(2) : (visible = true)"
- style="margin: 0 10px"
- >拒 绝</el-button
- >
- </el-popover>
- <el-button @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- <el-dialog
- :title="title"
- :visible.sync="openPrint"
- width="1280px"
- append-to-body
- @close="handleClose()"
- >
- <div style="display: flex; padding: 10px">
- <div
- style="
- display: flex;
- width: 170px;
- flex-direction: column;
- align-items: center;
- border-right: 1px solid #1ab394;
- "
- >
- <div
- style="
- display: flex;
- justify-content: center;
- align-items: center;
- height: 50px;
- width: 150px;
- font-size: 25px;
- padding: 10px;
- color: #1ab394;
- "
- v-for="item in printTypeList"
- :key="item.id"
- @click="handlePrintType(item)"
- :class="activePrint === item.name ? 'active' : ''"
- >
- {{ item.name }}
- </div>
- </div>
- <div
- style="
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- width: 1120px;
- "
- >
- <div class="print" id="prescriptionCore">
- <div
- style="
- display: flex;
- flex-direction: column;
- width: 80mm;
- height: 50mm;
- border: 1px solid #000;
- "
- v-show="activePrint === '标签'"
- >
- <div
- style="
- font-size: 15px;
- font-weight: bold;
- display: flex;
- justify-content: center;
- margin-top: 3px;
- "
- >
- <span id="printTitle">
- {{
- detailData.yljgName || ''
- }}(中药房)
- </span>
- </div>
- <div
- style="
- font-size: 15px;
- font-weight: bold;
- display: flex;
- justify-content: space-between;
- margin: 5px 8px 0;
- "
- >
- <div>{{ curName }},{{ curSex }},{{ detailData.patientBirthday }}</div>
- <span v-if="detailData.preMzZy==1">门诊</span>
- <span v-else-if="detailData.preMzZy==2">住院</span>
- </div>
- <div style="display: flex; align-items: center; margin: 0px 0 0 5px;">
- <div
- style="
- display: flex;
- flex-direction: column;
- justify-content: center;
- "
- >
- <JsBarcode
- v-if="openPrint"
- :presno="curPreNo"
- style="margin-top: 0px"
- ></JsBarcode>
- </div>
- <div
- style="
- display: flex;
- flex-direction: column;
- margin: 0px 0 0 10px;
- flex: 1;
- "
- >
- <!-- <div style="display: flex; font-size: 13px">
- 患者:
- <div style="font-weight: 500">
- {{ curName }},{{ curSex }}
- </div>
- </div> -->
- <!-- <div style="display: flex; font-size: 10px; margin-top: 5px">
- 出生日期:
- <div style="font-weight: 500">{{ formattedDate }}</div>
- </div> -->
- <!-- <div style="display: flex; font-size: 13px; margin-top: 5px">
- 类型:
- <div style="font-weight: 500">{{ curPreNameText }}</div>
- </div> -->
- <div style="display: flex; font-size: 13px;">
- 手机号:
- <div>{{ detailData.contactNumber }}</div>
- </div>
- <div style="display: flex; font-size: 13px;margin-top: 5px;">
- 处方用法:
- <div>{{ detailData.prescriptionusage }}</div>
- </div>
- <div style="display: flex; font-size: 13px;font-weight: bold; margin: 5px 10px 0 0; align-items: center;justify-content: space-between;">
- <div style="display: flex; font-size: 13px;font-weight: bold; align-items: center;">
- 剂数:
- <div
- style=""
- >
- {{ curNumber }}
- </div>
- </div>
- <div
- style="display: flex; font-size: 13px;font-weight: bold; align-items: center;"
- >
- 是否代煎:
- <div
- style=""
- >
- {{ isBehalfText }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div
- style="
- font-size: 13px;
- margin: 0 10px 0;
- "
- >
- 科室/病房:{{ detailData.department }}
- </div>
- <div
- style="
- font-size: 13px;
- margin: 3px 10px 0;
- "
- >
- 药师备注:{{ detailData.pharmacistsremarks }}
- </div>
- <div
- style="
- display: flex;
- justify-content: center;
- font-size: 13px;
- margin: 3px 10px 0;
- "
- >
- 打印时间:{{ curPrintTime }}
- </div>
- </div>
- <div
- v-show="activePrint === '中药处方笺'"
- style="
- display: flex;
- margin: 5px;
- background-color: #fff;
- flex-direction: column;
- align-items: center;
- height: 1030px;
- width: 680px;
- box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
- "
- >
- <div style="display: flex; flex-direction: column; width: 660px">
- <div
- style="
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- margin-top: 15px;
- "
- >
- <div
- style="
- display: flex;
- align-items: flex-start;
- border-right: 0 !important;
- "
- >
- <div style="display: flex; flex-direction: column">
- <JsBarcode :presno="curPreNo"></JsBarcode>
- </div>
- </div>
- <div
- style="
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 150px;
- font-size: 23.75px;
- font-weight: 800;
- "
- >
- 中药处方笺
- </div>
- <div
- style="
- display: flex;
- justify-content: center;
- font-size: 16px;
- width: 40px;
- font-weight: 300;
- "
- >
- {{
- detailData.type == "1"
- ? "中药处方"
- : detailData.type == "2"
- ? "中药制剂"
- : ""
- }}
- </div>
- </div>
- <div
- style="
- display: flex;
- flex-direction: column;
- margin: 20px 10px 10px;
- padding-bottom: 15px;
- border-bottom: 1px solid #979797;
- "
- >
- <div
- style="
- display: flex;
- flex-direction: row;
- margin-bottom: 5px;
- "
- >
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">姓名:</span
- >{{ detailData.name }}
- </div>
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">性别:</span
- >{{ detailData.sex }}
- </div>
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">年龄:</span
- >{{ detailData.age }}岁
- </div>
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">电话:</span
- >{{ detailData.contactNumber }}
- </div>
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">当前处方状态:</span
- >{{
- detailData.state == "1"
- ? "配药"
- : detailData.state == "2"
- ? "煎药"
- : detailData.state == "3"
- ? "发药"
- : detailData.state == "4"
- ? "配送"
- : ""
- }}
- </div>
- </div>
- <div
- style="
- display: flex;
- flex-direction: row;
- margin-bottom: 5px;
- "
- >
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">就诊科室:</span
- >{{ detailData.department }}
- </div>
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">临床诊断:</span
- >{{ detailData.disName }}
- <!-- —{{ detailData.symName }} -->
- </div>
- <div
- style="
- font-size: 12px;
- font-weight: 400;
- margin-right: 30px;
- "
- >
- <span style="color: #999999">开方时间:</span
- >{{ detailData.prescriptionTime }}
- </div>
- </div>
- <div
- style="display: flex; flex-direction: row; font-size: 12px"
- >
- <span style="color: #999999">联系地址:</span
- >{{ detailData.address }}
- </div>
- </div>
- </div>
- <div
- style="
- display: flex;
- flex-direction: column;
- width: 640px;
- align-items: flex-start;
- border-bottom: 1px solid #5a5e66;
- margin: 0px 10px 10px;
- "
- >
- <div style="display: flex; font-size: 22px">Rp:</div>
- <div
- style="
- display: flex;
- flex-wrap: wrap;
- flex-direction: row;
- justify-content: flex-start;
- align-content: flex-start;
- margin-left: 20px;
- height: 515px;
- "
- >
- <div
- style="
- display: flex;
- justify-content: center;
- width: 150px;
- align-items: center;
- margin: 0 0 10px 0;
- "
- v-for="(x, i) in detailData.detailList"
- :key="i"
- >
- <div
- style="
- display: flex;
- font-size: 15px;
- width: 100px;
- word-wrap: break-word;
- z-index: 100;
- justify-content: center;
- align-items: center;
- padding: 2px 5px;
- "
- >
- <!-- <el-tag effect="plain" >{{x.matName}} {{x.matDose}} {{x.matUnitName}}</el-tag>-->
- {{ x.matName }}{{ x.matDose }}{{ x.matUnitName }}
- </div>
- <div
- style="
- display: flex;
- flex-direction: column;
- margin-left: 5.31px;
- z-index: 200;
- "
- >
- <div style="font-size: 10px; height: 12.5px">
- {{ x.matUsageName }}
- </div>
- <div style="font-size: 10px; height: 12.5px">
- {{ x.sign }}
- </div>
- </div>
- </div>
- </div>
- <div
- style="margin: 0 10px 10px; display: flex; font-size: 15px"
- >
- <div style="display: flex; margin-right: 54.4px">
- 剂数:{{ detailData.number }}
- <div v-if="detailData.daijianCost !== ''" class="pies_tips">
- (代煎)
- </div>
- </div>
- <div style="display: flex; margin-right: 54.4px">
- {{ detailData.dosageForm }}
- </div>
- <div style="display: flex; margin-right: 54.4px">
- {{ detailData.prescriptionUsage }}
- </div>
- <div style="display: flex; margin-right: 54.4px">
- 每次{{ detailData.concentration }}
- </div>
- <div style="display: flex; margin-right: 54.4px">
- {{ detailData.frequency }}
- </div>
- <div>{{ detailData.medicationTime }}</div>
- </div>
- <div
- style="
- display: flex;
- justify-content: flex-end;
- font-size: 15px;
- margin-right: 10px;
- "
- >
- {{ detailData.entrust }}
- </div>
- </div>
- <div
- style="
- display: flex;
- margin: 0 10px 0;
- padding-bottom: 5px;
- border-bottom: 1px solid #979797;
- "
- >
- <div style="display: flex; flex-direction: column">
- <div
- style="
- border: 1px solid #979797;
- font-size: 15px;
- width: 287.5px;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 30px;
- "
- >
- <div class="pijw">
- 药品金额:{{ detailData.prescriptionSum }}
- </div>
- </div>
- <div
- style="
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 15px;
- height: 30px;
- width: 287.5px;
- border-left: 1px solid #979797;
- border-right: 1px solid #979797;
- "
- >
- <div
- style="
- width: 143.93px;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 30px;
- "
- >
- 煎药费:{{ detailData.daijianCost }}
- </div>
- <div
- style="
- border-left: 1px solid #979797;
- width: 143.93px;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 30px;
- "
- >
- 配送费:{{ detailData.distributionCost }}
- </div>
- </div>
- <div
- style="
- display: flex;
- justify-content: center;
- align-items: center;
- height: 30px;
- font-size: 15px;
- border: 1px solid #979797;
- "
- >
- 总金额:{{ detailData.prescriptionTotalSum }}
- <!-- <div class="zjw"></div> -->
- </div>
- </div>
- <div style="display: flex; flex-wrap: wrap; margin-left: 20px">
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">开方:</span
- >{{ operateList[0].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">审核:</span
- >{{ operateList[1].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">调配:</span
- >{{ operateList[2].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">复核:</span
- >{{ operateList[3].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">浸泡:</span
- >{{ operateList[4].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">煎煮:</span
- >{{ operateList[5].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">打包:</span
- >{{ operateList[6].operater }}
- </div>
- <div style="font-size: 15px; margin-right: 60px; width: 90px">
- <span style="font-size: 15px; color: #999999">发药:</span
- >{{ operateList[7].operater }}
- </div>
- </div>
- </div>
- <div
- style="margin: 10px 16px 10px; font-size: 15px; display: flex"
- >
- <div class="z">注:</div>
- <div>{{ entrust1111 }}</div>
- </div>
- </div>
- </div>
- <el-button
- style="
- margin-top: 50px;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: #1ab394;
- color: #ffffff;
- font-size: 20px;
- margin-top: 40px;
- width: 300px;
- height: 50px;
- "
- v-show="activePrint === '标签'"
- @click="onHandleUpdatePrintStatus()"
- >打 印</el-button
- >
- <el-button
- style="
- margin-top: 50px;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: #1ab394;
- color: #ffffff;
- font-size: 20px;
- margin-top: 40px;
- width: 300px;
- height: 50px;
- "
- v-show="activePrint === '中药处方笺'"
- v-print="'#prescriptionCore'"
- @click="onHandleUpdatePrintStatus()"
- >打 印</el-button
- >
- </div>
- </div>
- </el-dialog>
- <el-dialog
- title=""
- :visible.sync="dialogFormVisible"
- width="500px"
- @close="closeRemark"
- >
- <el-form :model="formRemark" :rules="rules" ref="ruleForm">
- <el-form-item label="备注:" prop="remark">
- <el-input v-model="formRemark.remark"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="closeRemark">取 消</el-button>
- <el-button type="primary" @click="setRemark">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog :fullscreen="true" :title="recipeEditTitle" :visible.sync="recipeEditOpen"
- custom-class="prescription-core-edit-container" width="1180px" size="mini"
- append-to-body destroy-on-close @closed="recipeEditId = null;recipeEditShow = false">
- <edit v-if="recipeEditShow" :id="recipeEditId" :mode="recipeEditMode" @close="recipeEditOpen = false;$event && getList()"></edit>
- </el-dialog>
- <el-dialog title="打印预览" :visible.sync="showPrint" @closed="showPrintId = ''">
- <print-container v-if="showPrintId" :id="showPrintId"
- :load-express="showPrintExpressCom"
- />
- </el-dialog>
- </div>
- </template>
- <script>
- import printer from '@/utils/printer.js'
- import axios from "axios";
- const instance = axios.create({
- // baseURL: 'http://47.118.22.101:8080',
- baseURL: "http://10.250.11.48:8080",
- timeout: 10000,
- headers: { "Content-Type": "application/json;charset=utf-8" },
- });
- import {
- listPrescriptionCore,
- getPrescriptionCore,
- delPrescriptionCore,
- addPrescriptionCore,
- updatePrescriptionCore,
- exportPrescriptionCore,
- check,
- addNum,
- } from "@/api/prescription/prescriptionCore";
- import { listMedicalMechanism } from "@/api/medical/mechanism";
- import QRCode from "qrcodejs2";
- import {
- releaseOrder,
- selectOrderDetail,
- remarkYS,
- } from "@/api/prescription/prescriptionAudit";
- import { updatePrintStatus } from "@/api/prescription/prescriptionCore";
- import Pres from "@/components/Pres/index.vue";
- import JsBarcode from "@/components/JsBarcode/index.vue";
- import Edit from "./edit.vue";
- import dayjs from "dayjs";
- import PrintContainer from '@/views/rescription/prescriptionCore/printContainer.vue';
- // import JsBarcode from "jsbarcode"
- // 防抖函数
- function debounce(fn, delay) {
- let timeout = null;
- return function() {
- let context = this;
- let args = arguments;
- if (timeout) clearTimeout(timeout);
- let callNow = !timeout;
- timeout = setTimeout(() => {
- timeout = null;
- }, delay);
- if (callNow) fn.apply(context, args);
- };
- }
- export default {
- name: "PrescriptionCore",
- components: {PrintContainer, Pres, JsBarcode, Edit },
- data() {
- const now = dayjs().format("YYYY-MM-DD");
- return {
- recipeEditMode: 'edit',
- recipeEditId: null,
- recipeEditOpen: false,
- recipeEditShow: false,
- curPreNo: "",
- curName: "",
- curSex: "",
- curAge: "",
- curPatientBirthday: "",
- //20231219新增三个字段
- curPreName: "",
- curNumber: "",
- curPrintTime: "",
- //20240229 新增是否代煎
- isBehalf: "",
- $baseUrl: this.$baseUrl,
- operateList: [
- { py: "kf", title: "开方", operater: "" },
- { py: "sh", title: "审核", operater: "" },
- { py: "tp", title: "调配", operater: "" },
- { py: "fh", title: "复核", operater: "" },
- { py: "jp", title: "浸泡", operater: "" },
- { py: "jz", title: "煎煮", operater: "" },
- { py: "db", title: "打包", operater: "" },
- { py: "fy", title: "发药", operater: "" },
- ],
- thirdPartStateArr: [
- { name: "已分配", id: 1 },
- { name: "已传送", id: 2 },
- ],
- checkStateArr: [
- { name: "待审核", id: 0 },
- { name: "审核通过", id: 1 },
- { name: "审核未通过", id: 2 },
- ],
- preMzZyArr: [
- { name: "门诊", id: 1 },
- { name: "住院", id: 2 },
- ],
- isPrintArr: [
- { name: "未打印", id: 0 },
- { name: "已打印", id: 1 },
- ],
- isBehalfArr: [
- { name: "否", id: 0 },
- { name: "是", id: 1 },
- ],
- deployStateArr: [
- { name: "已审核", id: 110, key: "audited" },
- // { name: "已审核不通过", id: 120, key: "---" },
- { name: "已调配", id: 130, key: "allocated" },
- { name: "已复核", id: 140, key: "reviewed" },
- { name: "已浸泡", id: 150, key: "soaked" },
- { name: "已煎煮", id: 160, key: "cooked" },
- { name: "已先煎", id: 161, key: "preCooked" },
- { name: "已开始煎煮", id: 162, key: "startedCooking" },
- { name: "已后下", id: 163, key: "lowered" },
- { name: "已结束煎煮", id: 164, key: "finishedCooking" },
- { name: "已开始浓缩", id: 165, key: "startedConcentration" },
- { name: "已结束浓缩", id: 166, key: "finishedConcentration" },
- { name: "已打包", id: 170, key: "packaged" },
- { name: "已上架", id: 171, key: "grounding" },
- { name: "已发药", id: 175, key: "send" },
- // { name: "煎药已作废", id: 999, key: "---" },
- ],
- entrust1111:
- "1、本处方当日有效\n 2、取药时请您当面核对。。。。 \n 3、延长处方用量时间原油:慢性病 其他老年病 外地 其他",
- visible: false,
- remarks: "",
- btnState: 1,
- rowId: null,
- detailData: {
- oralPreItemList: [],
- },
- activeName: "first",
- state: {
- 1: "配药",
- 2: "煎药",
- 3: "发药",
- 4: "配送",
- },
- openConsole: false,
- // 遮罩层
- loading: true,
- // 导出遮罩层
- exportLoading: false,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 处方审核表格数据
- prescriptionCoreList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // print相关
- openPrint: false,
- showPrint: false, // 打印页面弹窗
- showPrintId: '', // 打印页面弹窗
- showPrintExpressCom: false,
- activePrint: "标签",
- printTypeList: [
- { name: "标签", id: 0 },
- { name: "中药处方笺", id: 1 },
- ],
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- //state: 1,
- appId: null,
- yljgId: null,
- timeStamp: null,
- token: null,
- preNo: null,
- preName: null,
- name: null,
- sex: null,
- age: null,
- department: null,
- doctor: null,
- prescriptionTime: [now, now],
- disCode: null,
- disName: null,
- symCode: null,
- symName: null,
- westernDisease: null,
- westernCode: null,
- patientContent: null,
- nowDesc: null,
- pastDesc: null,
- fourDiagnosis: null,
- physical: null,
- auxiliaryExam: null,
- premzzy: null,
- visitNo: null,
- checkState: null,
- remarks: null,
- extendedTxt: null,
- address: null,
- contactNumber: null,
- consignee: null,
- takingMethod: null,
- yfId: window.localStorage.getItem("pharmacyId"),
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {},
- listMedicalMechanismArr: [],
- // 保存右侧合理用药信息
- rationalMed: [],
- // 从1-9 分别对应 超剂量 到 19反
- rationalMed1: [],
- rationalMed2: [],
- rationalMed3: [],
- rationalMed4: [],
- rationalMed5: [],
- rationalMed6: [],
- rationalMed7: [],
- rationalMed8: [],
- rationalMed9: [],
- rationalMed10: [],
- raDoseShow: false,
- dialogFormVisible: false, //药师备注
- formRemark: {
- remark: "",
- },
- rules: {
- remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
- },
- };
- },
- created() {
- this.getList();
- this.getListMedicalMechanism();
- },
- mixins: [printer],
- watch: {
- rationalMed10: {
- deep: true,
- immediate: true,
- handler: function () {
- this.countDose();
- },
- },
- },
- computed: {
- formattedDate() {
- const dateObj = new Date(this.curPatientBirthday);
- const year = dateObj.getFullYear();
- const month = dateObj.getMonth() + 1;
- const day = dateObj.getDate();
- return `${year}年${month}月${day}日`;
- },
- curPreNameText() {
- switch (this.curPreName) {
- case "0":
- return "散装饮片";
- case "1":
- return "散装颗粒";
- case "2":
- return "小包装饮片";
- case "3":
- return "小包装颗粒";
- defalut: return this.curPreName;
- }
- },
- isBehalfText() {
- if (this.isBehalf == 1) {
- return "是";
- } else {
- return "否";
- }
- },
- recipeEditTitle() {
- if (this.recipeEditMode === 'check') return '处方审核查看'
- return this.recipeEditId ? '复制处方' : '新增处方';
- }
- },
- methods: {
- countDose() {
- let show = false;
- this.rationalMed10.forEach((item) => {
- if (item.showDose) {
- show = true;
- }
- });
- this.$forceUpdate();
- this.raDoseShow = show;
- },
- // 获取右侧合理用药信息展示
- async getRationalMed(matCode) {
- let matCodes = [];
- matCodes.push(matCode);
- instance
- .post("/basis/knowlib/getMatInfoByMatCode", {
- matCode: matCode,
- matCodes: matCodes,
- })
- .then((res) => {
- if (res.status == 200) {
- let data = res.data;
- if (data.code == 0 && data.message) {
- this.rationalMed.push(data.data);
- // 去重
- const removeRepeat = (arr, key) => {
- let obj = {};
- arr = arr.reduce((pre, next) => {
- obj[next[key]]
- ? ""
- : (obj[next[key]] = true && pre.push(next));
- return pre;
- }, []);
- return arr;
- };
- this.rationalMed = removeRepeat(this.rationalMed, "matid");
- this.resetRationalMed();
- }
- }
- })
- .catch((err) => {
- console.log(123, err);
- });
- },
- resetRationalMed() {
- const removeRepeat = (arr, key) => {
- let obj = {};
- arr = arr.reduce((pre, next) => {
- obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
- return pre;
- }, []);
- return arr;
- };
- this.rationalMed1 = [];
- this.rationalMed2 = [];
- this.rationalMed3 = [];
- this.rationalMed4 = [];
- this.rationalMed5 = [];
- this.rationalMed6 = [];
- this.rationalMed7 = [];
- this.rationalMed8 = [];
- this.rationalMed9 = [];
- this.rationalMed10 = [];
- this.rationalMed = removeRepeat(this.rationalMed, "matid");
- this.rationalMed.forEach((item) => {
- item.showDose = item.showDose ? true : false;
- if (item.matdosage) {
- // 超剂量药品:
- this.rationalMed1.push(item);
- }
- if (item.matsjj) {
- // 慎忌禁用药:
- this.rationalMed2.push(item);
- }
- if (item.matyfsjj) {
- // 孕妇慎忌禁:
- this.rationalMed3.push(item);
- }
- if (item.matysjj) {
- // 服药饮食禁忌:
- this.rationalMed4.push(item);
- }
- if (item.matdxsm) {
- /// 药物毒性说明:
- this.rationalMed5.push(item);
- }
- if (item.matbzjj) {
- // 病证用药禁忌:
- this.rationalMed6.push(item);
- }
- if (item.matsbf) {
- // 18反
- this.rationalMed7.push(item);
- }
- if (item.matsjw) {
- // 十九畏:
- this.rationalMed8.push(item);
- }
- if (item.matby) {
- // 用药不宜:
- this.rationalMed9.push(item);
- }
- if (item.matmaxdosage && item.matmindosage) {
- this.rationalMed10.push(item);
- }
- });
- this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
- this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
- this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
- this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
- this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
- this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
- this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
- this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
- this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
- this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
- },
- tableRowClassName({ row, rowIndex }) {
- if (row.checkState == 0) {
- return "warning-row";
- }
- return "";
- },
- handleClose() {
- console.log("123123");
- this.getList();
- },
- onHandleUpdatePrintStatus() {
- if(this.activePrint == '标签'){
- const printWidth = 284
- const px2mm = 3.75
- const mm2dot = 8
- const dom = document.getElementById('printTitle')
- const titleWidth = (printWidth - dom.clientWidth * 0.8) / 2
- let data = `
- SIZE 80 mm,50 mm
- GAP 2 mm,0 mm
- OFFSET 0 mm
- REFERENCE ${( 5 / px2mm + 1.5 ) * mm2dot},0
- SPEED 4
- DENSITY 8
- DIRECTION 1
- SET HEAD ON
- SET PRINTKEY OFF
- SET KEY1 ON
- SET KEY2 ON
- SHIFT 0
- SET PEEL ON
- SET TEAR ON
- BACKFEED 0
- CLS
- TEXT ${titleWidth / px2mm * mm2dot},${ 8 / px2mm * mm2dot },"TSS24.BF2",0,1,2,"${this.detailData.yljgName}(中药房)"
- TEXT 0,${ 38 / px2mm * 8 },"TSS24.BF2",0,1,2,"${this.curName}, ${this.curSex}, ${this.detailData.patientBirthday}"
- TEXT ${(printWidth - 28) / px2mm * mm2dot},${38 / px2mm * mm2dot},"TSS24.BF2",0,1,2,"${this.detailData.preMzZy==1 ? '门诊' : '住院'}"
- BARCODE 0,${67 / px2mm * mm2dot},"128",${50 / px2mm * mm2dot},1,0,3,5,"${this.detailData.preNo}"
- TEXT ${(printWidth - 120) / px2mm * mm2dot},${(67 + 2) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"手机号:${this.detailData.contactNumber}"
- TEXT ${(printWidth - 120) / px2mm * mm2dot},${(67 + 25) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"处方用法:${this.detailData.prescriptionusage}"
- TEXT ${(printWidth - 120) / px2mm * mm2dot},${(67 + 48) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"剂数:${this.curNumber}"
- TEXT ${(printWidth - 70) / px2mm * mm2dot},${(67 + 48) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"是否代煎:${this.isBehalfText}"
- TEXT 0,${137 / px2mm * mm2dot},"TSS24.BF2",0,1,1,"科室/病房:${this.detailData.department}"
- TEXT 0,${155 / px2mm * mm2dot},"TSS24.BF2",0,1,1,"药师备注:${this.detailData.pharmacistsremarks||''}"
- TEXT ${70 / px2mm * mm2dot},${173 / px2mm * mm2dot},"TSS24.BF2",0,1,1,"打印时间:${this.detailData.printTime}"
- PRINT 1,1
- `
- this.auditId = this.detailData.id
- this.modelChange(data, 'audit')
- }else{
- updatePrintStatus({
- isPrint: "1",
- id: this.detailData.id,
- });
- }
- },
- // 表单重置
- reset() {
- this.curPreNo = "";
- this.curName = "";
- this.curSex = "";
- this.curAge = "";
- this.curPatientBirthday = "";
- //20231219新增三个字段
- this.curPreName = "";
- this.curNumber = "";
- this.curPrintTime = "";
- //20240229 新增是否代煎
- (this.isBehalf = ""),
- (this.form = {
- id: null,
- remarks: null,
- });
- this.remarks = null;
- this.resetForm("form");
- },
- // 备注
- getRemark(row) {
- this.dialogFormVisible = true;
- const id = row.id;
- this.rowId = id;
- },
- setRemark() {
- this.$refs.ruleForm.validate((valid) => {
- if (valid) {
- remarkYS({ id: this.rowId, remark: this.formRemark.remark }).then(
- (res) => {
- if (res.code === 200) {
- this.dialogFormVisible = false;
- this.msgSuccess("备注成功");
- }
- }
- );
- }
- });
- },
- closeRemark() {
- this.$refs.ruleForm.resetFields();
- this.formRemark.remark = "";
- this.dialogFormVisible = false;
- },
- //打印
- showPrintContentMethod(row) {
- this.showPrint = true;
- this.showPrintId = row.id;
- this.showPrintExpressCom = row.expressExecutor === '顺丰';
- },
- consoleBtn(row) {
- this.reset();
- this.activePrint = "标签";
- const id = row.id;
- console.log("id>>>>", id);
- this.detailData = {};
- selectOrderDetail({ id: id }).then((response) => {
- console.log("response.data>>>>", response.data);
- // debugger
- this.form = response.data;
- this.detailData = response.data;
- this.curPreNo = response.data.preNo;
- this.curName = response.data.name;
- this.curSex = response.data.sex;
- this.curAge = response.data.age;
- this.curPatientBirthday = response.data.patientBirthday;
- //20231219新增三个字段
- // this.curPreName = response.data.preName;
- //20240229 改成 中药处方类型
- this.curPreName = response.data.oralPre.zhongyaoType;
- //20240229 新增是否代煎
- this.isBehalf = response.data.isBehalf;
- this.curNumber = response.data.number;
- this.curPrintTime = response.data.printTime;
- this.detailData.patientBirthday = this.detailData.patientBirthday
- ? this.detailData.patientBirthday
- : "";
- this.detailData.presType = "普通处方"; //TODO neo
- console.log("handlePrint detailData", this.detailData);
- this.openPrint = true;
- this.operateList[0].operater = this.detailData.doctor || "";
- this.operateList[1].operater = this.detailData.checkBy || "";
- this.operateList[2].operater = this.detailData.tiaopeiName || "";
- const length = response.data.operateList;
- if (length > 0) {
- response.data.operateList.forEach((item) => {
- switch (item.type) {
- case "2":
- this.operateList[3].operater = item.createBy;
- break;
- case "3":
- this.operateList[4].operater = item.createBy;
- break;
- case "4":
- this.operateList[5].operater = item.createBy;
- break;
- case "5":
- this.operateList[6].operater = item.createBy;
- break;
- case "6":
- this.operateList[7].operater = item.createBy;
- break;
- defalut: console.log(
- "处方签res.data.operateList数据异常",
- item.type
- );
- }
- });
- }
- // this.title = "查看处/**/方审核";
- //console.log(response);
- });
- },
- handlePrintType(e) {
- console.log("this.activePrint", this.activePrint);
- console.log("click>>>", e.name);
- if (e.name && e.name !== this.activePrint) {
- this.activePrint = e.name;
- console.log(" change this.activePrint", this.activePrint);
- } else {
- console.log("nochange this.activePrint", this.activePrint);
- }
- },
- /** 释放订单 */
- handleRelease(row) {
- const ids = row.id || this.ids;
- this.$confirm(
- '是否确认释放处方编号为"' + row.preNo + '"的数据项?',
- "警告",
- {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }
- )
- .then(function () {
- return releaseOrder({ ids: ids });
- })
- .then(() => {
- this.getList();
- this.msgSuccess("释放成功");
- })
- .catch(() => {});
- },
- payOrder() {
- this.innerVisible = true;
- // 二维码内容,一般是由后台返回的跳转链接,这里是写死的一个链接
- this.qrcode = `https://yaofang.hzxunmai.com/doc#/input?id=${this.rowId}`;
- // 使用$nextTick确保数据渲染
- this.$nextTick(() => {
- this.crateQrcode();
- });
- },
- // 生成二维码
- crateQrcode() {
- this.qr = new QRCode("qrcode", {
- width: 100,
- height: 100, // 高度
- text: this.qrcode, // 二维码内容
- });
- },
- // 关闭弹框,清除已经生成的二维码
- closeCode() {
- this.$refs.qrcode.innerHTML = "";
- },
- handleClick(tab, event) {
- //console.log(tab, event);
- },
- /** 查询处方审核列表 */
- getList() {
- this.loading = true;
- var form = Object.assign({}, this.queryParams);
- // form.isPrint = '0'
- if (
- this.queryParams.prescriptionTime &&
- this.queryParams.prescriptionTime.length
- ) {
- form.startTime = this.queryParams.prescriptionTime[0];
- form.endTime = this.queryParams.prescriptionTime[1];
- } else {
- form.startTime = "";
- form.endTime = "";
- }
- delete form.prescriptionTime;
- listPrescriptionCore(form).then((response) => {
- this.prescriptionCoreList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- getListMedicalMechanism() {
- listMedicalMechanism().then((res) => {
- this.listMedicalMechanismArr = res.data;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- //审核拒绝
- checkBtn: debounce(function(num) {
- //console.log(num);
- let params = {
- checkState: num,
- id: this.rowId,
- remarks: this.remarks,
- };
- check(params).then((res) => {
- //console.log(res);
- if (res.code) {
- this.msgSuccess("修改成功");
- this.open = false;
- this.visible = false;
- this.getList();
- }
- });
- }, 1000),
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- const now = dayjs().format("YYYY-MM-DD");
- this.queryParams.prescriptionTime = [now, now];
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加处方审核";
- },
- /** 修改按钮操作 */
- handleUpdate(num, row) {
- if (num === 2) {
- this.recipeEditId = row.id;
- this.recipeEditShow = true;
- this.recipeEditOpen = true;
- return;
- }
- this.reset();
- const id = row.id || this.ids;
- this.btnState = num;
- this.rowId = id;
- (this.rowId = id), (this.btnState = num);
- getPrescriptionCore(id).then((response) => {
- // this.form = response.data;
- this.detailData = response.data;
- this.open = true;
- this.title = "查看处方审核";
- let _this = this;
- _this.rationalMed = [];
- if (
- response.data.oralPreItemList &&
- response.data.oralPreItemList.length > 0
- ) {
- response.data.oralPreItemList.forEach((i) => {
- _this.getRationalMed(i.matCode);
- });
- }
- //console.log(response);
- });
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id != null) {
- updatePrescriptionCore(this.form).then((response) => {
- this.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addPrescriptionCore(this.form).then((response) => {
- this.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$confirm("确定需要删除选中数据吗?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(function () {
- return delPrescriptionCore(ids);
- })
- .then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.exportLoading = true;
- return exportPrescriptionCore(queryParams);
- })
- .then((response) => {
- this.download(response.msg);
- this.exportLoading = false;
- })
- .catch(() => {});
- },
- },
- filters: {
- ftsjj(value) {
- if (value == 1) {
- return "慎用";
- }
- if (value == 2) {
- return "忌用";
- }
- if (value == 3) {
- return "禁用";
- }
- },
- fyfsjj(value) {
- if (value == 1) {
- return "孕妇慎用";
- }
- if (value == 2) {
- return "孕妇忌用";
- }
- if (value == 3) {
- return "孕妇禁用";
- }
- },
- },
- };
- </script>
- <style scoped>
- h3 {
- margin: 0;
- }
- #qrcode {
- width: 160px;
- margin: 0 auto;
- }
- .defwidth {
- width: 160px;
- }
- .prescriptionCore >>> .warning-row,
- .prescriptionCore >>> .el-table__body tr.warning-row.current-row > td,
- .prescriptionCore >>> .el-table__body tr.warning-row.hover-row > td {
- background: #e6a23c;
- color: #fff;
- }
- .prescriptionCore >>> .el-table__body tr.hover-row > td,
- .prescriptionCore >>> .el-table__body tr.hover-row.current-row > td,
- .prescriptionCore >>> .el-table__body tr.hover-row.el-table__row--striped > td,
- .prescriptionCore
- >>> .el-table__body
- tr.hover-row.el-table__row--striped.current-row
- > td {
- background-color: #3a5788;
- color: #fff;
- }
- .printbtn {
- background: #409eff;
- color: #fff;
- }
- .flex {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- padding: 0 30px;
- }
- .flex-sub {
- flex: 0 0 33.333333%;
- margin-top: 6px;
- }
- .totaltip {
- margin-bottom: 12px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .active {
- background-color: #1ab394;
- color: #ffffff !important;
- }
- </style>
- <style scoped>
- .display_f {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- }
- ._left {
- flex: 1;
- }
- ._right {
- width: 300px;
- max-height: 610px;
- padding: 0 30px;
- overflow-y: scroll;
- }
- .title-container {
- div {
- font-size: 18px;
- font-weight: 500;
- color: #000000;
- text-align: center;
- margin-bottom: 20px;
- }
- }
- .patiens-msg {
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #333333;
- .p {
- margin-bottom: 5px;
- cursor: default;
- .patiens-name {
- color: #17c7b1;
- font-weight: bold;
- font-size: 16px;
- }
- .patiens-desc {
- display: inline-block;
- .matname {
- color: #17c7b1;
- }
- }
- .patiens-cate {
- font-weight: bold;
- }
- }
- }
- ::v-deep svg{
- width: 32mm !important;
- height: auto !important;
- }
- </style>
|