12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784 |
- <template>
- <div class="layout_container">
- <header>
- <el-input
- v-model.trim="keyCode"
- class="w-50 m-2"
- style="width: 220px"
- placeholder="请输入批次号或者门诊号"
- clearable
- >
- <template #prepend>单号</template>
- </el-input>
- <el-input
- v-model.trim="setlId"
- class="w-50 m-2"
- style="width: 200px; margin-left: 3px"
- placeholder="请输入结算ID"
- clearable
- >
- <template #prepend>结算ID</template>
- </el-input>
- <el-date-picker
- v-model="dateRange"
- type="daterange"
- range-separator="至"
- start-placeholder="开始日期"
- :clearable="false"
- end-placeholder="结束日期"
- :shortcuts="shortcuts"
- style="width: 270px; margin-left: 3px"
- ></el-date-picker>
- <el-select
- v-model="opFlag"
- placeholder="请选择库存变更类型"
- style="width: 140px; margin-left: 3px"
- @change="queryItem"
- >
- <el-option
- v-for="item in kcList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-select
- v-model="ztFlag"
- placeholder="请选择销售类型"
- style="width: 140px; margin-left: 3px"
- @change="queryItem"
- >
- <el-option
- v-for="item in soldOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-select
- v-model="uploadGroupNoYk"
- placeholder="请选择药库"
- style="width: 140px; margin-left: 3px"
- @change="queryItem"
- >
- <el-option
- v-for="item in groupNoYkData"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-select
- v-model="uploadGroupNoYf"
- placeholder="请选择药房"
- style="width: 140px; margin-left: 3px"
- @change="queryItem"
- >
- <el-option
- v-for="item in groupNoYfData"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-select
- v-model="retFlag"
- placeholder="请选择上传状态"
- style="width: 140px; margin-left: 3px"
- >
- <el-option
- v-for="item in retOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-divider direction="vertical" />
- <el-button
- type="primary"
- icon="Search"
- @click="queryItem"
- style="margin-left: 5px"
- >查询
- </el-button>
- <el-button
- type="primary"
- icon="Upload"
- @click="uploadYpGoods"
- style="margin-left: 5px"
- v-show="
- editableTabsValue === 'ypInvinfo' ||
- editableTabsValue === 'ypPurchase' ||
- editableTabsValue === 'ypSelinfo'
- "
- >批量上传
- </el-button>
- <el-button
- type="primary"
- icon="Delete"
- @click="deleteYpGoods"
- style="margin-left: 5px"
- v-show="
- editableTabsValue === 'ypInvinfoCx' ||
- editableTabsValue === 'ypPurchaseCx' ||
- editableTabsValue === 'ypSelinfoCx'
- "
- >批量删除
- </el-button>
- </header>
- <div class="layout_main">
- <el-tabs
- class="el-tabs__fill"
- v-model="editableTabsValue"
- type="border-card"
- @tab-click="handleClick"
- >
- <el-tab-pane key="ypInvinfo" label="药品库存变更" name="ypInvinfo">
- <div class="layout_display_flex_y">
- <div class="layout_flex_1-y">
- <el-table
- :data="
- ypInvinfoData.slice(
- pageSizeInvinfo * (currentPageInvinfo - 1),
- pageSizeInvinfo * currentPageInvinfo
- )
- "
- border
- style="width: 100%"
- height="100%"
- stripe
- highlight-current-row
- @selection-change="handleInvinfoSelectionChange"
- class="normal-size"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column type="index" label="序号" width="60" />
- <el-table-column
- prop="fixmedinsHilistId"
- label="id"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="fixmedinsHilistName"
- label="name"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="medListCodg"
- label="药品国家医保编码"
- width="220"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- prop="chargeCode"
- label="药品编码"
- width="80"
- ></el-table-column>
- <el-table-column
- prop="chargeName"
- label="药品名称"
- width="240"
- ></el-table-column>
- <el-table-column
- prop="invChgType"
- label="库存变更类型"
- width="100"
- />
- <el-table-column
- prop="invChgTypeName"
- label="库存变更类型名称"
- width="120"
- />
- <el-table-column
- prop="fixmedinsBchno"
- label="批次流水号"
- width="110"
- ></el-table-column>
- <el-table-column prop="pric" label="单价" width="100" />
- <el-table-column prop="cnt" label="数量" width="100" />
- <el-table-column prop="rxFlag" label="处方药标志" width="100" />
- <el-table-column prop="trdnFlag" label="拆零标志" width="100" />
- <el-table-column
- prop="invChgTime"
- label="库存变更时间"
- width="130"
- />
- <el-table-column
- prop="invChgOpterName"
- label="经办人姓名"
- width="100"
- />
- <el-table-column
- prop="memo"
- label="备注"
- width="120"
- show-overflow-tooltip
- />
- <el-table-column
- fixed="right"
- label="操作"
- min-width="80"
- width="80"
- center
- >
- <template #default="scope">
- <el-button
- type="primary"
- size="small"
- @click="uploadYpInvinfoSingle(scope.row)"
- >上传
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="currentPageInvinfo"
- :page-size="pageSizeInvinfo"
- :page-sizes="[10, 15, 20, 25]"
- :total="ypInvinfoData.length"
- layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 5px"
- @size-change="handleSizeChangeInvinfo"
- @current-change="handleCurrentChangeInvinfo"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- key="ypInvinfoCx"
- label="药品库存变更上传查询"
- name="ypInvinfoCx"
- >
- <div class="layout_display_flex_y">
- <div class="layout_flex_1-y">
- <el-table
- :data="
- ypInvinfoUploadData.slice(
- pageSizeInvinfoCx * (currentPageInvinfoCx - 1),
- pageSizeInvinfoCx * currentPageInvinfoCx
- )
- "
- border
- style="width: 100%"
- height="100%"
- stripe
- highlight-current-row
- @selection-change="handleInvinfoSelectionChangeCx"
- class="normal-size"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column type="index" label="序号" width="60" />
- <el-table-column
- prop="fixmedinsHilistId"
- label="id"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="fixmedinsHilistName"
- label="name"
- width="100"
- v-if="false"
- />
- <el-table-column prop="uploadFlag" label="状态" width="80">
- <template #default="scope">
- <span v-if="scope.row.uploadFlag === '1'">已上传</span>
- <span v-else-if="scope.row.uploadFlag === '0'"
- >上传失败</span
- >
- <span v-else-if="scope.row.uploadFlag === '-2'"
- >已删除</span
- >
- <span v-else>{{ scope.row.uploadFlag }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="msgErr" label="上传信息" width="100">
- <template #default="scope">
- <span v-if="scope.row.msgErr">
- <el-popover
- effect="light"
- trigger="click"
- placement="top-start"
- width="left"
- >
- <template #default>
- <div>
- <span style="color: red">上传信息:</span>
- {{ scope.row.msgErr }}
- </div>
- </template>
- <template #reference>
- <el-tag>{{ scope.row.msgErr }}</el-tag>
- </template>
- </el-popover>
- </span>
- <span v-else>{{ scope.row.msgErr }}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="medListCodg"
- label="药品国家医保编码"
- width="220"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- prop="chargeCode"
- label="药品编码"
- width="80"
- ></el-table-column>
- <el-table-column
- prop="chargeName"
- label="药品名称"
- width="240"
- ></el-table-column>
- <el-table-column
- prop="invChgType"
- label="库存变更类型"
- width="100"
- />
- <el-table-column
- prop="invChgTypeName"
- label="库存变更类型名称"
- width="120"
- />
- <el-table-column
- prop="fixmedinsBchno"
- label="批次流水号"
- width="110"
- ></el-table-column>
- <el-table-column prop="pric" label="单价" width="100" />
- <el-table-column prop="cnt" label="数量" width="100" />
- <el-table-column prop="rxFlag" label="处方药标志" width="100" />
- <el-table-column prop="trdnFlag" label="拆零标志" width="100" />
- <el-table-column
- prop="invChgTime"
- label="库存变更时间"
- width="130"
- />
- <el-table-column
- prop="invChgOpterName"
- label="经办人姓名"
- width="100"
- />
- <el-table-column
- prop="memo"
- label="备注"
- width="120"
- show-overflow-tooltip
- />
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="currentPageInvinfoCx"
- :page-size="pageSizeInvinfoCx"
- :page-sizes="[10, 15, 20, 25]"
- :total="ypInvinfoUploadData.length"
- layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 5px"
- @size-change="handleSizeChangeInvinfoCx"
- @current-change="handleCurrentChangeInvinfoCx"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- key="ypPurchase"
- label="药品入库/退货上传"
- name="ypPurchase"
- v-if="false"
- >
- <div class="layout_display_flex_y">
- <div class="layout_flex_1-y">
- <el-table
- :data="
- ypPurchaseData.slice(
- pageSizePurchase * (currentPagePurchase - 1),
- pageSizePurchase * currentPagePurchase
- )
- "
- border
- style="width: 100%"
- height="100%"
- stripe
- highlight-current-row
- @selection-change="handlePurchaseSelectionChange"
- class="normal-size"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column type="index" label="序号" width="60" />
- <el-table-column
- prop="fixmedinsHilistId"
- label="id"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="fixmedinsHilistName"
- label="name"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="medListCodg"
- label="药品编码"
- width="80"
- ></el-table-column>
- <el-table-column
- prop="chargeName"
- label="药品名称"
- width="240"
- ></el-table-column>
- <el-table-column
- prop="fixmedinsBchno"
- label="入/退库单号"
- width="110"
- ></el-table-column>
- <el-table-column
- prop="splerName"
- label="供应商名称"
- width="200"
- show-overflow-tooltip
- />
- <el-table-column
- prop="manuLotnum"
- label="生产批号"
- width="100"
- />
- <el-table-column
- prop="prodentpName"
- label="生产厂家名称"
- width="200"
- show-overflow-tooltip
- />
- <el-table-column prop="aprvno" label="批准文号" width="130" />
- <el-table-column prop="manuDate" label="生产日期" width="100" />
- <el-table-column prop="expyEnd" label="有效期止" width="100" />
- <el-table-column
- prop="finlTrnsPric"
- label="最终成交单价"
- width="100"
- />
- <el-table-column
- prop="purcRetnCnt"
- label="采购/退货数量"
- width="100"
- />
- <el-table-column
- prop="purcInvoNo"
- label="采购/退货发票号"
- width="100"
- />
- <el-table-column prop="rxFlag" label="处方药标志" width="100" />
- <el-table-column
- prop="purcRetnStoinTime"
- label="入/退库时间"
- width="130"
- />
- <el-table-column
- prop="purcRetnOpterName"
- label="经办人姓名"
- width="100"
- />
- <el-table-column
- prop="memo"
- label="备注"
- width="100"
- show-overflow-tooltip
- />
- <el-table-column
- fixed="right"
- label="操作"
- min-width="180"
- width="180"
- center
- >
- <template #default="scope">
- <el-button
- type="primary"
- size="small"
- @click="uploadYpPurchaseSingle(scope.row)"
- >上传
- </el-button>
- <el-button
- type="primary"
- size="small"
- @click="callYpInvoice(scope.row)"
- >更新发票号
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="currentPagePurchase"
- :page-size="pageSizePurchase"
- :page-sizes="[10, 15, 20, 25]"
- :total="ypPurchaseData.length"
- layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 5px"
- @size-change="handleSizeChangePurchase"
- @current-change="handleCurrentChangePurchase"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane key="ypSelinfo" label="药品销售/退货上传" name="ypSelinfo">
- <div class="layout_display_flex_y">
- <div class="layout_flex_1-y">
- <el-table
- :data="
- ypSelinfoData.slice(
- pageSizeSelinfo * (currentPageSelinfo - 1),
- pageSizeSelinfo * currentPageSelinfo
- )
- "
- border
- style="width: 100%"
- height="100%"
- stripe
- highlight-current-row
- @selection-change="handleSelinfoSelectionChange"
- class="normal-size"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column type="index" label="序号" width="60" />
- <el-table-column
- prop="fixmedinsHilistId"
- label="id"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="fixmedinsHilistName"
- label="name"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="medListCodg"
- label="药品国家医保编码"
- width="200"
- show-overflow-tooltip
- />
- <el-table-column
- prop="chargeCode"
- label="药品编码"
- width="80"
- />
- <el-table-column
- prop="chargeName"
- label="药品名称"
- width="240"
- />
- <el-table-column
- prop="fixmedinsBchno"
- label="销售/退货单号"
- width="135"
- />
- <el-table-column
- prop="prscDrName"
- label="开方医师姓名"
- width="100"
- />
- <el-table-column prop="pharName" label="药师姓名" width="100" />
- <el-table-column
- prop="pharPracCertNo"
- label="药师执业资格证号"
- width="120"
- />
- <el-table-column prop="setlId" label="结算ID" width="100" />
- <el-table-column
- prop="mdtrtSetlType"
- label="结算方式"
- width="100"
- >
- <template #header>
- <span>结算方式</span>
- <el-tooltip class="box-item" effect="dark" placement="top">
- <template #content
- >注:<br />1 表示医保结算;2 表示自费结算。</template
- >
- <el-icon color="red" size="14"
- ><QuestionFilled
- /></el-icon>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column
- prop="mdtrtSn"
- label="就医流水号"
- width="100"
- />
- <el-table-column
- prop="manuLotnum"
- label="生产批号"
- width="120"
- />
- <el-table-column prop="manuDate" label="生产日期" width="100" />
- <el-table-column prop="expyEnd" label="有效期止" width="100" />
- <el-table-column prop="rxFlag" label="处方药标志" width="100">
- <template #header>
- <span>处方药标志</span>
- <el-tooltip class="box-item" effect="dark" placement="top">
- <template #content
- >注:<br />0 表示非处方药;1 表示处方药。</template
- >
- <el-icon color="red" size="14"
- ><QuestionFilled
- /></el-icon>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column prop="trdnFlag" label="拆零标志" width="100">
- <template #header>
- <span>拆零标志</span>
- <el-tooltip class="box-item" effect="dark" placement="top">
- <template #content
- >注:<br />0 表示否;1 表示是。</template
- >
- <el-icon color="red" size="14"
- ><QuestionFilled
- /></el-icon>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column
- prop="finlTrnsPric"
- label="最终成交单价"
- width="100"
- />
- <el-table-column
- prop="rtalDocno"
- label="零售单据号"
- width="120"
- />
- <el-table-column
- prop="drugTracCodg"
- label="药品追溯码"
- width="145"
- />
- <el-table-column
- prop="drugProdBarc"
- label="药品条形码"
- width="120"
- />
- <el-table-column
- prop="selRetnCnt"
- label="销售/退货数量"
- width="100"
- />
- <el-table-column
- prop="selRetnTime"
- label="销售/退货时间"
- width="145"
- />
- <el-table-column
- prop="selRetnOpterName"
- label="经办人姓名"
- width="100"
- />
- <el-table-column
- prop="memo"
- label="备注"
- width="100"
- show-overflow-tooltip
- />
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="currentPageSelinfo"
- :page-size="pageSizeSelinfo"
- :page-sizes="[10, 15, 20, 25]"
- :total="ypSelinfoData.length"
- layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 5px"
- @size-change="handleSizeChangeSelinfo"
- @current-change="handleCurrentChangeSelinfo"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- key="ypPurchaseCx"
- label="药品入库/退货上传查询"
- name="ypPurchaseCx"
- v-if="false"
- >
- <div class="layout_display_flex_y">
- <div class="layout_flex_1-y">
- <el-table
- :data="
- ypPurchaseUploadData.slice(
- pageSizePurchaseCx * (currentPagePurchaseCx - 1),
- pageSizePurchaseCx * currentPagePurchaseCx
- )
- "
- border
- style="width: 100%"
- height="100%"
- stripe
- highlight-current-row
- @selection-change="handlePurchaseSelectionChangeCx"
- class="normal-size"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column type="index" label="序号" width="60" />
- <el-table-column
- prop="fixmedinsHilistId"
- label="id"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="fixmedinsHilistName"
- label="name"
- width="100"
- v-if="false"
- />
- <el-table-column prop="uploadFlag" label="状态" width="80">
- <template #default="scope">
- <span v-if="scope.row.uploadFlag === '1'">已上传</span>
- <span v-else-if="scope.row.uploadFlag === '0'"
- >上传失败</span
- >
- <span v-else>{{ scope.row.uploadFlag }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="msgErr" label="上传信息" width="100">
- <template #default="scope">
- <span v-if="scope.row.msgErr">
- <el-popover
- effect="light"
- trigger="click"
- placement="top-start"
- width="left"
- >
- <template #default>
- <div>
- <span style="color: red">上传信息:</span>
- {{ scope.row.msgErr }}
- </div>
- </template>
- <template #reference>
- <el-tag>{{ scope.row.msgErr }}</el-tag>
- </template>
- </el-popover>
- </span>
- <span v-else>{{ scope.row.msgErr }}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="medListCodg"
- label="药品编码"
- width="80"
- />
- <el-table-column
- prop="chargeCode"
- label="药品编码"
- width="80"
- />
- <el-table-column
- prop="chargeName"
- label="药品名称"
- width="240"
- ></el-table-column>
- <el-table-column
- prop="fixmedinsBchno"
- label="入/退库单号"
- width="110"
- ></el-table-column>
- <el-table-column
- prop="splerName"
- label="供应商名称"
- width="200"
- show-overflow-tooltip
- />
- <el-table-column
- prop="manuLotnum"
- label="生产批号"
- width="100"
- />
- <el-table-column
- prop="prodentpName"
- label="生产厂家名称"
- width="200"
- show-overflow-tooltip
- />
- <el-table-column prop="aprvno" label="批准文号" width="130" />
- <el-table-column prop="manuDate" label="生产日期" width="100" />
- <el-table-column prop="expyEnd" label="有效期止" width="100" />
- <el-table-column
- prop="finlTrnsPric"
- label="最终成交单价"
- width="100"
- />
- <el-table-column
- prop="purcRetnCnt"
- label="采购/退货数量"
- width="100"
- />
- <el-table-column
- prop="purcInvoNo"
- label="采购/退货发票号"
- width="100"
- />
- <el-table-column prop="rxFlag" label="处方药标志" width="100" />
- <el-table-column
- prop="purcRetnStoinTime"
- label="入/退库时间"
- width="135"
- />
- <el-table-column
- prop="purcRetnOpterName"
- label="经办人姓名"
- width="100"
- />
- <el-table-column
- prop="memo"
- label="备注"
- width="100"
- show-overflow-tooltip
- />
- <el-table-column
- fixed="right"
- label="操作"
- min-width="180"
- width="180"
- center
- >
- <template #default="scope">
- <el-button
- type="primary"
- size="small"
- v-if="scope.row.uploadFlag === '-1'"
- @click="uploadYpPurchaseSingle(scope.row)"
- >重传
- </el-button>
- <el-button
- type="primary"
- size="small"
- @click="callYpInvoice(scope.row)"
- >更新发票号
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="currentPagePurchaseCx"
- :page-size="pageSizePurchaseCx"
- :page-sizes="[10, 15, 20, 25]"
- :total="ypPurchaseUploadData.length"
- layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 5px"
- @size-change="handleSizeChangePurchaseCx"
- @current-change="handleCurrentChangePurchaseCx"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane
- key="ypSelinfoCx"
- label="药品销售/退货上传查询"
- name="ypSelinfoCx"
- >
- <div class="layout_display_flex_y">
- <div class="layout_flex_1-y">
- <el-table
- :data="
- ypSelinfoUploadData.slice(
- pageSizeSelinfoCx * (currentPageSelinfoCx - 1),
- pageSizeSelinfoCx * currentPageSelinfoCx
- )
- "
- border
- style="width: 100%"
- height="100%"
- stripe
- highlight-current-row
- @selection-change="handleSelinfoSelectionChangeCx"
- class="normal-size"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column type="index" label="序号" width="60" />
- <el-table-column
- prop="fixmedinsHilistId"
- label="id"
- width="100"
- v-if="false"
- />
- <el-table-column
- prop="fixmedinsHilistName"
- label="name"
- width="100"
- v-if="false"
- />
- <el-table-column prop="uploadFlag" label="状态" width="80">
- <template #default="scope">
- <span v-if="scope.row.uploadFlag === '1'">已上传</span>
- <span v-else-if="scope.row.uploadFlag === '0'"
- >上传失败</span
- >
- <span v-else>{{ scope.row.uploadFlag }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="msgErr" label="上传信息" width="160">
- <template #default="scope">
- <span v-if="scope.row.msgErr">
- <el-popover
- effect="light"
- trigger="click"
- placement="top-start"
- width="left"
- >
- <template #default>
- <div>
- <span style="color: red">上传信息:</span>
- {{ scope.row.msgErr }}
- </div>
- </template>
- <template #reference>
- <el-tag>{{ scope.row.msgErr }}</el-tag>
- </template>
- </el-popover>
- </span>
- <span v-else>{{ scope.row.msgErr }}</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="medListCodg"
- label="药品国家医保编码"
- width="200"
- show-overflow-tooltip
- />
- <el-table-column
- prop="chargeCode"
- label="药品编码"
- width="80"
- />
- <el-table-column
- prop="chargeName"
- label="药品名称"
- width="240"
- />
- <el-table-column
- prop="fixmedinsBchno"
- label="销售/退货单号"
- width="135"
- />
- <el-table-column
- prop="prscDrName"
- label="开方医师姓名"
- width="100"
- />
- <el-table-column prop="pharName" label="药师姓名" width="100" />
- <el-table-column
- prop="pharPracCertNo"
- label="药师执业资格证号"
- width="120"
- />
- <el-table-column prop="setlId" label="结算ID" width="100" />
- <el-table-column
- prop="mdtrtSetlType"
- label="结算方式"
- width="100"
- >
- <template #header>
- <span>结算方式</span>
- <el-tooltip class="box-item" effect="dark" placement="top">
- <template #content
- >注:<br />1 表示医保结算;2 表示自费结算。</template
- >
- <el-icon color="red" size="14"
- ><QuestionFilled
- /></el-icon>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column
- prop="mdtrtSn"
- label="就医流水号"
- width="100"
- />
- <el-table-column
- prop="manuLotnum"
- label="生产批号"
- width="120"
- />
- <el-table-column prop="manuDate" label="生产日期" width="100" />
- <el-table-column prop="expyEnd" label="有效期止" width="100" />
- <el-table-column prop="rxFlag" label="处方药标志" width="100">
- <template #header>
- <span>处方药标志</span>
- <el-tooltip class="box-item" effect="dark" placement="top">
- <template #content
- >注:<br />0 表示非处方药;1 表示处方药。</template
- >
- <el-icon color="red" size="14"
- ><QuestionFilled
- /></el-icon>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column prop="trdnFlag" label="拆零标志" width="100">
- <template #header>
- <span>拆零标志</span>
- <el-tooltip class="box-item" effect="dark" placement="top">
- <template #content
- >注:<br />0 表示否;1 表示是。</template
- >
- <el-icon color="red" size="14"
- ><QuestionFilled
- /></el-icon>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column
- prop="finlTrnsPric"
- label="最终成交单价"
- width="100"
- />
- <el-table-column
- prop="rtalDocno"
- label="零售单据号"
- width="120"
- />
- <el-table-column
- prop="drugTracCodg"
- label="药品追溯码"
- width="145"
- show-overflow-tooltip
- />
- <el-table-column
- prop="drugProdBarc"
- label="药品条形码"
- width="120"
- />
- <el-table-column
- prop="selRetnCnt"
- label="销售/退货数量"
- width="100"
- />
- <el-table-column
- prop="selRetnTime"
- label="销售/退货时间"
- width="145"
- />
- <el-table-column
- prop="selRetnOpterName"
- label="经办人姓名"
- width="100"
- />
- <el-table-column prop="patNo" label="门诊号" width="100" />
- <el-table-column prop="times" label="门诊次数" width="80" />
- <el-table-column
- prop="createTime"
- label="销售/退货上传时间"
- width="145"
- />
- <el-table-column
- prop="memo"
- label="备注"
- width="100"
- show-overflow-tooltip
- />
- </el-table>
- </div>
- <div>
- <el-pagination
- :current-page="currentPageSelinfoCx"
- :page-size="pageSizeSelinfoCx"
- :page-sizes="[10, 15, 20, 25]"
- :total="ypSelinfoUploadData.length"
- layout="total, sizes, prev, pager, next, jumper"
- style="margin-top: 5px"
- @size-change="handleSizeChangeSelinfoCx"
- @current-change="handleCurrentChangeSelinfoCx"
- >
- </el-pagination>
- </div>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
- <el-dialog v-model="dialogFormVisible" title="更新发票号" width="500">
- <el-form :model="formData">
- <el-input v-model="formData.serial" v-show="false" />
- <el-form-item label="单号" :label-width="formLabelWidth">
- <el-input v-model="formData.inDocuNo" disabled />
- </el-form-item>
- <el-form-item label="序号" :label-width="formLabelWidth">
- <el-input v-model="formData.inSeri" disabled />
- </el-form-item>
- <el-form-item label="药品编码" :label-width="formLabelWidth">
- <el-input v-model="formData.medListCodg" disabled />
- </el-form-item>
- <el-form-item label="药品名称" :label-width="formLabelWidth">
- <el-input v-model="formData.chargeName" disabled />
- </el-form-item>
- <el-form-item label="发票号" :label-width="formLabelWidth">
- <el-input v-model.trim="formData.purcInvoNo" autocomplete="off" />
- </el-form-item>
- </el-form>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialogFormVisible = false">取消</el-button>
- <el-button type="primary" @click="updateYpInvoice">保存</el-button>
- </div>
- </template>
- </el-dialog>
- </template>
- <script setup name="YpCodgUpload">
- import { nextTick, onMounted, ref } from "vue";
- import { ElMessage, ElMessageBox } from "element-plus";
- import {
- deleteYpUploadBatch,
- saveYpInvoice,
- selectYpInvinfoDetail,
- selectYpInvinfoResult,
- selectYpPurchaseDetail,
- selectYpPurchaseResult,
- selectYpSelinfoDetail,
- selectYpSelinfoResult,
- uploadYpInvinfoBatch,
- uploadYpPurchaseBatch,
- uploadYpPurchaseReturnBatch,
- uploadYpSelinfoBatch,
- uploadYpSelinfoReturnBatch,
- } from "@/api/yp-codg/yp-codg-upload";
- import { shortcuts } from "@/data/shortcuts.js";
- import {
- formatDate,
- getDateRangeFormatDate,
- subtractTime,
- } from "@/utils/date.js";
- import { QuestionFilled } from "@element-plus/icons-vue";
- import { useYfGroupStore } from "@/pinia/use-yf-group";
- import { selectGroupNoInfo } from "@/api/yp-dict/yp-comm-dict.js";
- const kcList = ref([]);
- const retOptions = [
- { value: "", label: "全部" },
- { value: "1", label: "上传成功" },
- { value: "0", label: "上传失败" },
- ];
- const editableTabsValue = ref("ypInvinfo");
- const start = formatDate(shortcuts[0].value[0]);
- const end = formatDate(shortcuts[0].value[0]);
- const dateRange = ref([]);
- const soldOptions = [
- { value: "3", label: "销售" },
- { value: "4", label: "销售退货" },
- ];
- const queryData = ref({
- startTime: "",
- endTime: "",
- docuNo: "",
- patNo: "",
- setlId: "",
- chargeCode: "",
- invChgType: "",
- groupNo: "",
- type: "",
- uploadFlag: "",
- });
- const pageSizeInvinfo = ref(20);
- const currentPageInvinfo = ref(1);
- const handleSizeChangeInvinfo = val => {
- pageSizeInvinfo.value = val;
- };
- const handleCurrentChangeInvinfo = val => {
- currentPageInvinfo.value = val;
- };
- const pageSizeInvinfoCx = ref(20);
- const currentPageInvinfoCx = ref(1);
- const handleSizeChangeInvinfoCx = val => {
- pageSizeInvinfoCx.value = val;
- };
- const handleCurrentChangeInvinfoCx = val => {
- currentPageInvinfoCx.value = val;
- };
- const pageSizePurchase = ref(20);
- const currentPagePurchase = ref(1);
- const handleSizeChangePurchase = val => {
- pageSizePurchase.value = val;
- };
- const handleCurrentChangePurchase = val => {
- currentPagePurchase.value = val;
- };
- const pageSizeSelinfo = ref(20);
- const currentPageSelinfo = ref(1);
- const handleSizeChangeSelinfo = val => {
- pageSizeSelinfo.value = val;
- };
- const handleCurrentChangeSelinfo = val => {
- currentPageSelinfo.value = val;
- };
- const pageSizePurchaseCx = ref(20);
- const currentPagePurchaseCx = ref(1);
- const handleSizeChangePurchaseCx = val => {
- pageSizePurchaseCx.value = val;
- };
- const handleCurrentChangePurchaseCx = val => {
- currentPagePurchaseCx.value = val;
- };
- const pageSizeSelinfoCx = ref(20);
- const currentPageSelinfoCx = ref(1);
- const handleSizeChangeSelinfoCx = val => {
- pageSizeSelinfoCx.value = val;
- };
- const handleCurrentChangeSelinfoCx = val => {
- currentPageSelinfoCx.value = val;
- };
- const ypInvinfoData = ref([]);
- const ypInvinfoUploadData = ref([]);
- const ypPurchaseData = ref([]);
- const ypPurchaseUploadData = ref([]);
- const ypSelinfoData = ref([]);
- const ypSelinfoUploadData = ref([]);
- const selectInvinfoDataList = ref([]);
- const handleInvinfoSelectionChange = data => {
- selectInvinfoDataList.value = data;
- };
- const selectInvinfoDataListCx = ref([]);
- const handleInvinfoSelectionChangeCx = data => {
- selectInvinfoDataListCx.value = data;
- };
- const selectPurchaseDataList = ref([]);
- const handlePurchaseSelectionChange = data => {
- selectPurchaseDataList.value = data;
- };
- const selectPurchaseDataListCx = ref([]);
- const handlePurchaseSelectionChangeCx = data => {
- selectPurchaseDataListCx.value = data;
- };
- const selectSelinfoDataList = ref([]);
- const handleSelinfoSelectionChange = data => {
- selectSelinfoDataList.value = data;
- };
- const selectSelinfoDataListCx = ref([]);
- const handleSelinfoSelectionChangeCx = data => {
- selectSelinfoDataListCx.value = data;
- };
- const keyCode = ref("");
- const setlId = ref('')
- const ztFlag = ref("3");
- const retFlag = ref("");
- const opFlag = ref("108");
- const uploadGroupNoYk = ref("11");
- const uploadGroupNoYf = ref(useYfGroupStore().getDefaultXyCode);
- const groupNoYfData = ref([]);
- const groupNoYkData = ref([]);
- onMounted(() => {
- nextTick(() => {
- queryData.value.startTime = start;
- queryData.value.endTime = end + " 23:59:59";
- dateRange.value = [start, end];
- queryGroupNoInfo();
- queryCodgInvinfoUpload();
- });
- });
- const queryGroupNoInfo = () => {
- selectGroupNoInfo()
- .then(res => {
- groupNoYfData.value = res.yfList;
- groupNoYkData.value = res.ykList;
- kcList.value = res.kcList;
- })
- .catch(() => {
- groupNoYfData.value = [];
- groupNoYkData.value = [];
- kcList.value = [];
- });
- };
- // 查询药品库存变更待上传信息
- const queryCodgInvinfoUpload = () => {
- selectInvinfoDataList.value = [];
- if (dateRange.value) {
- let dateS = getDateRangeFormatDate(dateRange.value);
- queryData.value.startTime = dateS.startTime;
- queryData.value.endTime = dateS.endTime;
- } else {
- queryData.value.startTime = start;
- queryData.value.endTime = end;
- ElMessage({
- type: "info",
- message: "默认查询本月的数据",
- duration: 2500,
- showClose: true,
- });
- }
- queryData.value.docuNo = keyCode.value;
- queryData.value.groupNo = uploadGroupNoYk.value;
- queryData.value.invChgType = opFlag.value;
- queryData.value.uploadFlag = retFlag.value;
- selectYpInvinfoDetail(queryData.value)
- .then(res => {
- ypInvinfoData.value = res;
- })
- .catch(() => {
- ypInvinfoData.value = [];
- });
- };
- // 查询药品库存变更上传结果信息
- const queryCodgInvinfoUploadResult = () => {
- selectPurchaseDataList.value = [];
- if (dateRange.value) {
- let dateS = getDateRangeFormatDate(dateRange.value);
- queryData.value.startTime = dateS.startTime;
- queryData.value.endTime = dateS.endTime;
- } else {
- queryData.value.startTime = start;
- queryData.value.endTime = end;
- ElMessage({
- type: "info",
- message: "默认查询本月的数据",
- duration: 2500,
- showClose: true,
- });
- }
- queryData.value.docuNo = keyCode.value;
- queryData.value.groupNo = uploadGroupNoYk.value;
- queryData.value.invChgType = opFlag.value;
- queryData.value.uploadFlag = retFlag.value;
- selectYpInvinfoResult(queryData.value)
- .then(res => {
- ypInvinfoUploadData.value = res;
- })
- .catch(() => {
- ypInvinfoUploadData.value = [];
- });
- };
- // 查询药品入库/退货待上传信息
- const queryCodgPurchaseUpload = () => {
- selectPurchaseDataList.value = [];
- if (dateRange.value) {
- let dateS = getDateRangeFormatDate(dateRange.value);
- queryData.value.startTime = dateS.startTime;
- queryData.value.endTime = dateS.endTime;
- } else {
- queryData.value.startTime = start;
- queryData.value.endTime = end;
- ElMessage({
- type: "info",
- message: "默认查询本月的数据",
- duration: 2500,
- showClose: true,
- });
- }
- queryData.value.docuNo = keyCode.value;
- queryData.value.groupNo = uploadGroupNoYk.value;
- queryData.value.type = ztFlag.value;
- queryData.value.uploadFlag = retFlag.value;
- selectYpPurchaseDetail(queryData.value)
- .then(res => {
- ypPurchaseData.value = res;
- })
- .catch(() => {
- ypPurchaseData.value = [];
- });
- };
- // 查询药品销售/退货待上传信息
- const queryCodgSelinfoUpload = () => {
- selectSelinfoDataList.value = [];
- if (dateRange.value) {
- let dateS = getDateRangeFormatDate(dateRange.value);
- let days = subtractTime(dateS.endTime, dateS.startTime);
- if (days > 1) {
- ElMessage({
- type: "info",
- message: "查询药品销售数据请不要超过2天!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- queryData.value.startTime = dateS.startTime;
- queryData.value.endTime = dateS.endTime;
- } else {
- queryData.value.startTime = start;
- queryData.value.endTime = end;
- ElMessage({
- type: "info",
- message: "默认查询本月的数据",
- duration: 2500,
- showClose: true,
- });
- }
- queryData.value.patNo = keyCode.value;
- queryData.value.groupNo = uploadGroupNoYf.value;
- queryData.value.setlId = setlId.value;
- queryData.value.type = ztFlag.value;
- queryData.value.uploadFlag = retFlag.value;
- selectYpSelinfoDetail(queryData.value)
- .then(res => {
- ypSelinfoData.value = res;
- })
- .catch(() => {
- ypSelinfoData.value = [];
- });
- };
- // 查询药品入库/退货上传结果信息
- const queryCodgPurchaseUploadResult = () => {
- selectPurchaseDataList.value = [];
- if (dateRange.value) {
- let dateS = getDateRangeFormatDate(dateRange.value);
- queryData.value.startTime = dateS.startTime;
- queryData.value.endTime = dateS.endTime;
- } else {
- queryData.value.startTime = start;
- queryData.value.endTime = end;
- ElMessage({
- type: "info",
- message: "默认查询本月的数据",
- duration: 2500,
- showClose: true,
- });
- }
- queryData.value.docuNo = keyCode.value;
- queryData.value.groupNo = uploadGroupNoYk.value;
- queryData.value.type = ztFlag.value;
- queryData.value.uploadFlag = retFlag.value;
- selectYpPurchaseResult(queryData.value)
- .then(res => {
- ypPurchaseUploadData.value = res;
- })
- .catch(() => {
- ypPurchaseUploadData.value = [];
- });
- };
- // 查询药品销售/退货上传结果信息
- const queryCodgSelinfoUploadResult = () => {
- selectSelinfoDataList.value = [];
- if (dateRange.value) {
- let dateS = getDateRangeFormatDate(dateRange.value);
- queryData.value.startTime = dateS.startTime;
- queryData.value.endTime = dateS.endTime;
- } else {
- queryData.value.startTime = start;
- queryData.value.endTime = end;
- ElMessage({
- type: "info",
- message: "默认查询本月的数据",
- duration: 2500,
- showClose: true,
- });
- }
- queryData.value.patNo = keyCode.value;
- queryData.value.groupNo = uploadGroupNoYf.value;
- queryData.value.setlId = setlId.value;
- queryData.value.type = ztFlag.value;
- queryData.value.uploadFlag = retFlag.value;
- selectYpSelinfoResult(queryData.value)
- .then(res => {
- ypSelinfoUploadData.value = res;
- })
- .catch(() => {
- ypSelinfoUploadData.value = [];
- });
- };
- // 查询
- const queryItem = () => {
- if (editableTabsValue.value === "ypInvinfo") {
- queryCodgInvinfoUpload();
- } else if (editableTabsValue.value === "ypPurchase") {
- queryCodgPurchaseUpload();
- } else if (editableTabsValue.value === "ypSelinfo") {
- queryCodgSelinfoUpload();
- } else if (editableTabsValue.value === "ypPurchaseCx") {
- queryCodgPurchaseUploadResult();
- } else if (editableTabsValue.value === "ypSelinfoCx") {
- queryCodgSelinfoUploadResult();
- } else if (editableTabsValue.value === "ypInvinfoCx") {
- queryCodgInvinfoUploadResult();
- }
- };
- const handleClick = (tab, event) => {
- // 查询哪个tab页面
- editableTabsValue.value = tab.props.name;
- if (editableTabsValue.value === "ypInvinfo") {
- queryCodgInvinfoUpload();
- } else if (editableTabsValue.value === "ypPurchase") {
- queryCodgPurchaseUpload();
- } else if (editableTabsValue.value === "ypSelinfo") {
- queryCodgSelinfoUpload();
- } else if (editableTabsValue.value === "ypPurchaseCx") {
- queryCodgPurchaseUploadResult();
- } else if (editableTabsValue.value === "ypSelinfoCx") {
- queryCodgSelinfoUploadResult();
- } else if (editableTabsValue.value === "ypInvinfoCx") {
- queryCodgInvinfoUploadResult();
- }
- };
- // 批量上传
- const uploadYpGoods = () => {
- ElMessageBox.confirm("请确认是否批量上传选择的内容?", {
- cancelButtonText: "取消",
- confirmButtonText: "确定",
- type: "warning",
- distinguishCancelAndClose: true,
- }).then(() => {
- if ("ypInvinfo" === editableTabsValue.value) {
- uploadYpInvinfoGoods(selectInvinfoDataList.value);
- } else if ("ypInvinfoCx" === editableTabsValue.value) {
- uploadYpInvinfoGoods(selectInvinfoDataList.value);
- } else if ("ypPurchase" === editableTabsValue.value) {
- uploadYpPurchaseGoods(selectPurchaseDataList.value);
- } else if ("ypPurchaseCx" === editableTabsValue.value) {
- uploadYpPurchaseGoods(selectPurchaseDataList.value);
- } else if ("ypSelinfo" === editableTabsValue.value) {
- uploadYpSelinfoGoods(selectSelinfoDataList.value);
- } else if ("ypSelinfoCx" === editableTabsValue.value) {
- uploadYpSelinfoGoods(selectSelinfoDataList.value);
- } else {
- ElMessage({
- type: "warning",
- message: "请选择正确的查询模式!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- });
- };
- // 药品库存变更单个上传
- const selectDataS = ref([]);
- const uploadYpInvinfoSingle = row => {
- selectDataS.value.push(row);
- uploadYpInvinfoGoods(selectDataS.value);
- selectData.value = [];
- };
- const uploadYpInvinfoGoods = data => {
- if (data.length === 0) {
- ElMessage({
- type: "warning",
- message: "请选择需要上传的药品库存变更数据!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- uploadYpInvinfoBatch(data)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- queryItem();
- })
- .catch(() => {});
- };
- // 药品入库/退货单个上传
- const selectData = ref([]);
- const uploadYpPurchaseSingle = row => {
- selectData.value.push(row);
- uploadYpPurchaseGoods(selectData.value);
- selectData.value = [];
- };
- const uploadYpPurchaseGoods = data => {
- if (data.length === 0) {
- ElMessage({
- type: "warning",
- message: "请选择需要上传的药品入库/退货数据!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- if (ztFlag.value === "1") {
- uploadYpPurchaseBatch(data)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- })
- .catch(() => {});
- } else if (ztFlag.value === "2") {
- uploadYpPurchaseReturnBatch(data)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- })
- .catch(() => {});
- }
- queryCodgPurchaseUpload();
- };
- // 删除上传信息
- const deleteYpGoods = () => {
- ElMessageBox.confirm("请确认是否批量删除选择的内容?", {
- cancelButtonText: "取消",
- confirmButtonText: "确定",
- type: "warning",
- distinguishCancelAndClose: true,
- }).then(() => {
- let uploadData = ref([]);
- if ("ypInvinfoCx" === editableTabsValue.value) {
- selectInvinfoDataListCx.value[0].type = "0";
- uploadData.value = selectInvinfoDataListCx.value;
- } else if ("ypPurchaseCx" === editableTabsValue.value) {
- selectPurchaseDataListCx.value[0].type = ztFlag.value;
- uploadData.value = selectPurchaseDataListCx.value;
- } else if ("ypSelinfoCx" === editableTabsValue.value) {
- selectSelinfoDataListCx.value[0].type = ztFlag.value;
- uploadData.value = selectSelinfoDataListCx.value;
- } else {
- ElMessage({
- type: "warning",
- message: "请选择正确的查询模式!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- if (uploadData.value.length === 0) {
- ElMessage({
- type: "warning",
- message: "请选择需要删除的数据!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- deleteYpUploadBatch(uploadData.value)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- queryItem();
- })
- .catch(() => {});
- });
- };
- // 更新退货的发票号
- const dialogFormVisible = ref(false);
- const formLabelWidth = "140px";
- const formData = ref({
- inDocuNo: "",
- inSeri: "",
- medListCodg: "",
- chargeName: "",
- serial: "",
- purcInvoNo: "",
- });
- const callYpInvoice = row => {
- dialogFormVisible.value = true;
- formData.value = row;
- };
- const updateYpInvoice = () => {
- if (!formData.value.purcInvoNo) {
- ElMessage({
- type: "warning",
- message: "请选择填写发票号!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- saveYpInvoice(formData.value)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- queryCodgPurchaseUpload();
- dialogFormVisible.value = false;
- })
- .catch(() => {});
- };
- // -------- 商品销售上传相关 -----------------
- const uploadYpSelinfoGoods = data => {
- if (data.length === 0) {
- ElMessage({
- type: "warning",
- message: "请选择需要上传的药品销售/退货数据!",
- duration: 2500,
- showClose: true,
- });
- return false;
- }
- if (ztFlag.value === "3") {
- uploadYpSelinfoBatch(data)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- queryItem();
- })
- .catch(() => {});
- } else if (ztFlag.value === "4") {
- uploadYpSelinfoReturnBatch(data)
- .then(res => {
- ElMessage({
- type: "success",
- message: res.msg,
- duration: 2500,
- showClose: true,
- });
- queryItem();
- })
- .catch(() => {});
- }
- };
- </script>
|