12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- <el-button
- size="small"
- @click="AddNewOrder"
- class="filter-item"
- style="float: right"
- type="primary"
- icon="el-icon-circle-plus-outline"
- >新增</el-button
- >
- </div>
- <div class="app-container">
- <div class="cell clearfix">
- <label class="title"><span class="name">仓库</span> :</label>
- <el-select
- size="small"
- v-model="storehouse_id"
- filterable
- placeholder="请选择仓库"
- style="width: 200px"
- @change="changeStoreHouse"
- >
- <el-option
- v-for="(option, index) in houselist"
- :key="index"
- :label="option.storehouse_name"
- :value="option.id"
- >
- </el-option>
- </el-select>
- <el-input
- size="small"
- style="width: 200px"
- class="filter-item"
- v-model.trim="searchKey"
- placeholder="单据编码/制单人/耗材名称"
- />
- <el-button
- size="small"
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="search"
- >搜索</el-button
- >
- <div style="margin-left: 10px">
- <label class="title"><span class="name">出库时间</span> : </label>
- <el-date-picker
- size="small"
- v-model="start_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 196px"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- @change="startTimeChange"
- ></el-date-picker>
- <span class="cellLine"> - </span>
- <el-date-picker
- size="small"
- v-model="end_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 196px"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- @change="endTimeChange"
- ></el-date-picker>
- </div>
- <!-- <div style="margin-left: 10px">
- <span>审核状态:</span>
- <el-select
- v-model="check_id"
- style="width: 140px; margin-right: 10px"
- placeholder="请选择"
- @change="changeTypeName"
- >
- <el-option
- v-for="item in checkList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </div> -->
- </div>
-
- <div class="cell clearfix">
- <el-checkbox
- style="width: 70px"
- v-model="checked"
- @change="changeAllSelected"
- >全选</el-checkbox
- >
- <el-button size="small" icon="el-icon-delete" @click="batchDelete"
- >删除</el-button
- >
- <el-button size="small" type="primary" @click="toPrint">打印</el-button>
- <el-button size="small" type="primary" @click="toExport" :disabled="exportLoding">导出</el-button>
- <span> </span>
- <label class="title"><span class="name">出库方式</span> :</label>
- <el-select size="small" v-model="way_type" filterable placeholder="请选择仓库" style="width:200px" @change="changeWay">
- <el-option
- v-for="(option, index) in wayList"
- :key="index"
- :label="option.name"
- :value="option.id">
- </el-option>
- </el-select>
-
- <span> </span>
- <label class="title"><span class="name">审核状态</span> :</label>
- <el-select size="small" v-model="check_type" filterable placeholder="请选择仓库" style="width:200px" @change="changeCheckType">
- <el-option
- v-for="(option, index) in checkList"
- :key="index"
- :label="option.name"
- :value="option.id">
- </el-option>
- </el-select>
- </div>
-
- <el-table
- :data="warehouseOutDate"
- :class="signAndWeighBoxPatients"
- style="width: 100%"
- border
- highlight-current-row
- ref="multipleTable"
- @selection-change="select"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- @current-change="handleSearch"
- >
- <el-table-column type="selection" width="55" align="center">
- </el-table-column>
-
- <el-table-column label="单据日期" align="center">
- <template slot-scope="scope">
- {{ scope.row.warehouse_out_time | parseTime("{y}-{m}-{d}") }}
- </template>
- </el-table-column>
-
- <el-table-column label="单据编号" align="center">
- <template slot-scope="scope">
- {{ scope.row.warehouse_out_order_number }}
- </template>
- </el-table-column>
-
- <el-table-column label="仓库名称" align="center">
- <template slot-scope="scope">
- {{ getHouseName(scope.row.storehouse_id) }}
- </template>
- </el-table-column>
-
- <el-table-column label="制单人" align="center">
- <template slot-scope="scope">
- {{ getXuserName(scope.row.creater) }}
- </template>
- </el-table-column>
-
- <el-table-column label="出库方式" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.is_sys == 1">自动出库</span>
- <span v-if="scope.row.is_sys == 0">手动出库</span>
- <span v-if="scope.row.is_sys == 12">调拨出库</span>
- <span v-if="scope.row.is_sys == 5">结算出库</span>
- </template>
- </el-table-column>
-
- <el-table-column label="审核状态" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.is_check == 1">已审核</span>
- <span v-if="scope.row.is_check == 2">未审核</span>
- </template>
- </el-table-column>
-
- <el-table-column label="操作" align="center" width="300px">
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="dark"
- content="编辑"
- placement="top"
- >
- <el-button
- size="mini"
- type="primary"
- icon="el-icon-edit-outline"
- @click="handleEdit(scope.$index, scope.row)"
- >
- </el-button>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="dark"
- content="删除"
- placement="top"
- >
- <el-button
- size="mini"
- type="danger"
- :disabled="scope.row.is_sys == 1"
- icon="el-icon-delete"
- @click="handleDelete(scope.$index, scope.row)"
- >
- </el-button>
- </el-tooltip>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[5, 10, 50, 100]"
- :page-size="5"
- background
- style="margin-top: 20px; text-align: right"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
-
-
- <!-- 详情 -->
- <div v-show="tableShow" style="margin-top: 10px">
- <el-table
- :data="tableList"
- :class="signAndWeighBoxPatients"
- style="width: 100%"
- border
- highlight-current-row
- ref="multipleTableOne"
- @selection-change="select"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- :cell-class-name="cellStyle"
- >
- <el-table-column label="耗材名称" align="center">
- <template slot-scope="scope">
- {{ scope.row.good_name }}
- </template>
- </el-table-column>
-
- <el-table-column label="规格&单位" align="center">
- <template slot-scope="scope">
- {{ scope.row.specification_name }} / {{ scope.row.packing_unit }}
- </template>
- </el-table-column>
-
- <el-table-column label="国家编码" align="center">
- <template slot-scope="scope">
- {{ scope.row.social_security_directory_code }}
- </template>
- </el-table-column>
-
- <!-- <el-table-column label="仓库名称" align="center">
- <template slot-scope="scope">
- {{ getHouseName(scope.row.storehouse_id) }}
- </template>
- </el-table-column> -->
- <!-- <el-table-column label="剩余库存" align="center" v-if="is_sys== 0">
- <template slot-scope="scope">
- <span>{{scope.row.stock_count}}</span>
- </template>
- </el-table-column> -->
-
- <el-table-column label="仓库名称" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{ getHouseName(item.storehouse_id) }}
- </td>
- </tr>
-
- </template>
- </el-table-column>
-
- <el-table-column label="出库数量" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getAllStockCount(scope.row.child,item.warehousing_id) - getCancelInfo(item.warehousing_id,item.good_id)}}
- </td>
- </tr>
-
- </template>
- </el-table-column>
- <el-table-column label="批次" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getNumber(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
-
- </template>
- </el-table-column>
- <el-table-column label="出库对象" align="center" v-if="is_sys == 0">
- <template slot-scope="scope">
-
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{ getXuserName(scope.row.admin_user_id) }}
- </td>
- </tr>
- </template>
- </el-table-column>
-
- <el-table-column label="使用患者" align="center" v-if="is_sys == 0">
- <template slot-scope="scope">
-
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getPatientName(item.patient_id ) }}
- </td>
- </tr>
- </template>
- </el-table-column>
-
- <el-table-column label="出货价" align="center">
- <template slot-scope="scope">
-
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getAllStockCountPrice(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="总价" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <!-- {{(getAllStockCount(scope.row.child,item.warehousing_id) * getAllStockCountPrice(scope.row.child,item.warehousing_id)).toFixed(2)}} -->
- {{((getAllStockCount(scope.row.child,item.warehousing_id) - getCancelInfo(item.warehousing_id,item.good_id)) * getAllStockCountPrice(scope.row.child,item.warehousing_id)).toFixed(2)}}
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="生产厂家" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getManufactuerNameSix(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="经销商" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getDealerNameSix(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="生产日期" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getProductDate(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
-
- </template>
- </el-table-column>
- <el-table-column label="有效期" align="center">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getExpiryDate(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
- </template>
- </el-table-column>
-
- <el-table-column label="注册编码" align="center" v-if="is_sys == 1">
- <template slot-scope="scope">
-
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span>{{getRegisterNumber(scope.row.child,item.warehousing_id)}}</span>
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="注册编码" align="center" v-if="is_sys == 0">
- <template slot-scope="scope">
-
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span>{{scope.row.register_number}}</span>
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="备注" align="center" v-if="is_sys == 1">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.childOne" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- {{getRemark(scope.row.child,item.warehousing_id)}}
- </td>
- </tr>
-
- </template>
- </el-table-column>
- <el-table-column label="备注" align="center" v-if="is_sys == 0">
- <template slot-scope="scope">
-
-
- {{scope.row.remark}}
-
-
-
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center">
- <template slot-scope="scope">
- <span
- style="color: #589ff8"
- @click="GetOrderDetailById(scope.row)"
- >使用明细</span
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
-
- <!-- 新增弹窗 -->
-
- <el-dialog title="提示" :visible.sync="dialogVisible" width="80%">
- <span>
- <div class="filter-container">
- <span style="font-size: 18px; color: #606266">出库单详情</span>
- <el-row style="float: right">
- <span style="color: #606266">{{
- warehousingOutInfo.info.warehouse_out_order_number
- }}</span>
- </el-row>
- </div>
-
- <div class="cell clearfix">
- <span style="width: 300px; color: #606266"
- >单据日期:
- {{
- warehousingOutInfo.info.warehouse_out_time
- | parseTime("{y}-{m}-{d}")
- }}
- </span>
- <span style="width: 300px; color: #606266"
- >厂商
- {{ getManufactuerName(warehousingOutInfo.info.manufacturer) }}</span
- >
- <span style="width: 300px; color: #606266"
- >经销商 {{ getDealerName(warehousingOutInfo.info.dealer) }}</span
- >
- </div>
-
- <div class="filter-container" style="margin-top: 10px">
- <el-button
- size="small"
- icon="el-icon-edit"
- @click="editRecord(warehousingOutInfo.info.id)"
- v-if="warehousingOutInfo.info.is_sys != 1"
- >编辑</el-button
- >
- <el-button
- size="small"
- icon="el-icon-delete"
- @click="deleteRecord"
- v-if="warehousingOutInfo.info.is_sys != 1"
- >删除</el-button
- >
- </div>
-
- <el-row :gutter="12" style="margin-top: 10px">
- <el-table
- :data="warehousingOutInfo.warehousingOutData"
- :class="signAndWeighBoxPatients"
- style="width: 100%"
- border
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
- >
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>耗材类型</span>
- </template>
-
- <template slot-scope="scope">
- <span v-if="scope.row.good_type_id != 0">{{
- getTypeName(scope.row.good_type_id)
- }}</span>
- </template>
- </el-table-column>
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>耗材名称</span>
- </template>
-
- <template slot-scope="scope">
- <span v-if="scope.row.good_id != 0">{{
- getTypeNameOne(scope.row.good_id)
- }}</span>
- </template>
- </el-table-column>
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>规格型号</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.good_id != 0">{{
- getSpecificationName(scope.row.good_id)
- }}</span>
- </template>
- </el-table-column>
-
- <el-table-column min-width="23" align="center">
- <template slot="header" slot-scope="scope">
- <span>出货价</span>
- </template>
- <template slot-scope="scope">
- <span>{{ scope.row.price }}</span>
- </template>
- </el-table-column>
-
- <el-table-column min-width="23" align="center">
- <template slot="header" slot-scope="scope">
- <span>出库数量</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_sys == 0">{{ scope.row.count }}</span>
- <span v-if="scope.row.is_sys == 1">{{
- getOutStockCount(scope.row.good_id)
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="总价" min-width="20" align="center">
- <template slot-scope="scope">
- {{ calculate(scope.row.price * scope.row.count) }}
- </template>
- </el-table-column>
-
- <el-table-column label="备注" min-width="20" align="center">
- <template slot-scope="scope">
- <el-popover placement="top-start" width="250" trigger="hover">
- <div>{{ scope.row.remark }}</div>
- <span slot="reference" v-if="scope.row.remark.length > 20">{{
- scope.row.remark.substr(0, 20) + "..."
- }}</span>
- <span slot="reference" v-else>{{ scope.row.remark }}</span>
- </el-popover>
- </template>
- </el-table-column>
-
- <el-table-column label="" align="center">
- <template slot-scope="scope" v-if="scope.row.is_sys == 1">
- <div
- style="color: #589ff8"
- @click="GetOrderDetailThree(scope.row.id)"
- >
- 使用明细
- </div>
- </template>
- </el-table-column>
- </el-table>
- </el-row>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="dialogVisible = false"
- >确 定</el-button
- >
- </span>
- </el-dialog>
-
- <!-- 使用明细查询 -->
- <el-dialog
- title="出库单详情"
- :visible.sync="editdialogVisibleTwo"
- width="80%"
- >
- <span>
- <div class="filter-container">
- <span style="font-size: 18px; color: #606266">耗材使用明细</span>
- </div>
-
- <el-row :gutter="12" style="margin-top: 10px">
- <el-table
- :data="infoList"
- :class="signAndWeighBoxPatients"
- style="width: 80%"
- border
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
- >
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>序号</span>
- </template>
- <template slot-scope="scope">
- {{ scope.$index + 1 }}
- </template>
- </el-table-column>
-
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用人</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_sys == 0">系统 </span>
- <span v-if="scope.row.is_sys == 5"> {{getRow(scope.row)}} </span>
- </template>
- </el-table-column>
-
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用数量</span>
- </template>
- <template slot-scope="scope">
- {{ scope.row.count }}
- </template>
- </el-table-column>
-
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用时间</span>
- </template>
- <template slot-scope="scope">
- <span
- >{{ scope.row.ctime | parseTime("{y}-{m}-{d}") }}
- </span>
- </template>
- </el-table-column>
- </el-table>
- </el-row>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="editdialogVisibleTwo = false">取 消</el-button>
- <el-button type="primary" @click="editdialogVisibleTwo = false"
- >确 定</el-button
- >
- </span>
- </el-dialog>
-
- <!-- 编辑 -->
- <el-dialog title="编辑出库单" :visible.sync="editDialogVisible" width="80%">
- <span>
- <div style="margin-bottom: 10px">
- <label class="title"><span class="name">出库时间</span> : </label>
- <el-date-picker
- size="small"
- v-model="warehouse_out_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 196px"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- <label class="title" style="margin-left: 10px"
- ><span class="name">经 销 商</span> :
- </label>
- <el-select
- size="small"
- v-model="form.dealer"
- clearable
- placeholder="请选择经销商"
- @change="changeDealer"
- >
- <el-option
- v-for="(option, index) in dealer"
- :key="index"
- :label="option.dealer_name"
- :value="option.id"
- >
- </el-option>
- </el-select>
- <label class="title" style="margin-left: 10px"
- ><span class="name">厂商</span> :
- </label>
-
- <el-select
- size="small"
- v-model="form.manufacturer"
- clearable
- placeholder="请选择厂商"
- @change="changeManufacturer"
- >
- <el-option
- v-for="(option, index) in manufacturer"
- :key="index"
- :label="option.manufacturer_name"
- :value="option.id"
- >
- </el-option>
- </el-select>
- </div>
-
- <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
- <el-table
- :data="recordInfo.recordData"
- :class="signAndWeighBoxPatients"
- style="width: 100%"
- border
- max-height="450"
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
- >
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>耗材类型<span style="color: red">*</span></span>
- </template>
-
- <template slot-scope="scope">
- <el-form-item style="padding-top: 15px">
- <el-input
- placeholder="请输入商品类型"
- v-model="scope.row.good_type_id"
- :value="typeName(scope.row.good_type_id)"
- @focus="showDialog(scope.$index, scope.row)"
- ></el-input>
- </el-form-item>
- </template>
- </el-table-column>
-
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>规格名称<span style="color: red">*</span></span>
- </template>
- <template slot-scope="scope">
- <el-form-item style="padding-top: 15px">
- <el-input
- placeholder="请输入规格名称"
- v-model="scope.row.good_id"
- :value="specificationName(scope.row.good_id)"
- @focus="showDialog(scope.$index, scope.row)"
- ></el-input>
- </el-form-item>
- </template>
- </el-table-column>
-
- <el-table-column min-width="23" align="center">
- <template slot="header" slot-scope="scope">
- <span>单价<span style="color: red">*</span></span>
- </template>
- <template slot-scope="scope">
- <el-form-item
- :prop="'recordData.' + scope.$index + '.price'"
- :rules="tableRules.price"
- style="padding-top: 17px"
- >
- <el-input type="number" v-model="scope.row.price"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
-
- <el-table-column min-width="23" align="center">
- <template slot="header" slot-scope="scope">
- <span>出库数量<span style="color: red">*</span></span>
- </template>
- <template slot-scope="scope">
- <el-form-item
- :prop="'recordData.' + scope.$index + '.count'"
- :rules="tableRules.count"
- style="padding-top: 17px"
- >
- <el-input type="number" v-model="scope.row.count"></el-input>
- </el-form-item>
- </template>
- </el-table-column>
-
- <el-table-column label="总价" min-width="20" align="center">
- <template slot-scope="scope">
- {{ calculate(scope.row.price * scope.row.count) }}
- </template>
- </el-table-column>
- <el-table-column label="备注" min-width="20" align="center">
- <template slot-scope="scope">
- <el-input v-model="scope.row.remark"></el-input>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" min-width="30">
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="dark"
- content="新增"
- placement="top"
- >
- <el-button
- size="mini"
- type="primary"
- icon="el-icon-circle-plus-outline"
- @click="handleEditOne(scope.$index, scope.row)"
- >
- </el-button>
- </el-tooltip>
- <el-tooltip
- class="item"
- effect="dark"
- content="删除"
- placement="top"
- >
- <el-button
- size="mini"
- type="danger"
- icon="el-icon-delete"
- @click="handleDeleteOne(scope.$index, scope.row)"
- >
- </el-button>
- </el-tooltip>
- </template>
- </el-table-column>
- </el-table>
- </el-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="editDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="submit">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="出库明细"
- :visible.sync="editdialogVisibleThree"
- width="70%"
- >
- <span>
- <div class="app-container">
- <div class="filter-container">
- <span style="font-size: 18px; color: #606266">商品使用明细</span>
- </div>
-
- <el-row :gutter="12" style="margin-top: 10px">
- <el-table
- :data="userList"
- :class="signAndWeighBoxPatients"
- style="width: 50%"
- border
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
- >
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>序号</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 0">{{
- scope.$index + 1
- }}</span>
- <span v-if="scope.row.is_total == 1">{{ "合计" }}</span>
- </template>
- </el-table-column>
-
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用人</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 0">{{
- scope.row.name
- }}</span>
- <span v-if="scope.row.is_total == 1"></span>
- </template>
- </el-table-column>
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用数量</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 0">{{ scope.row.count - scope.row.cancel_count}}{{ scope.row.packing_unit }}</span>
- <span v-if="scope.row.is_total == 1">{{ scope.row.total}}</span>
- </template>
- </el-table-column>
- <el-table-column min-width="60" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用时间</span>
- </template>
- <template slot-scope="scope">
- <span
- >{{ scope.row.ctime | parseTime("{y}-{m}-{d}") }}
- </span>
- </template>
- </el-table-column>
- </el-table>
- </el-row>
- </div>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="editdialogVisibleThree = false">取 消</el-button>
- <el-button type="primary" @click="editdialogVisibleThree = false"
- >确 定</el-button
- >
- </span>
- </el-dialog>
-
- <stock-in-dialog
- ref="dialog"
- :propForm="propForm"
- :visibility="isVisibility"
- v-on:dialog-comfirm="comfirm"
- v-on:dialog-cancle="cancle"
- >
- </stock-in-dialog>
- </div>
- </template>
-
- <script>
- import { uParseTime } from "@/utils/tools";
- import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
-
- import {
- deleteWarehouseOut,
- GetAllConfig,
- getWarehouseOutList,
- getWarehouseOutInfo,
- getWarehouseOutUser,
- GetOutStockTotalCount,
- deleteWarehouseOutInfo,
- GetAllGoodInfoByID,
- editWarehouseoutInfo,
- getOrderDetailByOrderId,
- getOrderDetailById,
- getOutExportList,
- } from "@/api/stock";
- import BreadCrumb from "../components/bread-crumb";
- import StockInDialog from "./Dialog/stockInDialog";
-
- export default {
- name: "salesReturnOrder",
- components: { StockInDialog, BreadCrumb },
- created() {
- var nowDate = new Date();
- var nowYear = nowDate.getFullYear();
- var nowMonth = nowDate.getMonth() + 1;
- var nowDay = nowDate.getDate();
- this.end_time =
- nowYear +
- "-" +
- (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
- "-" +
- (nowDay < 10 ? "0" + nowDay : nowDay);
- nowDate.setMonth(nowDate.getMonth() - 1);
- nowYear = nowDate.getFullYear();
- nowMonth = nowDate.getMonth() + 1;
- nowDay = nowDate.getDate();
-
- this.start_time =
- nowYear +
- "-" +
- (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
- "-" +
- (nowDay < 10 ? "0" + nowDay : nowDay);
- this.GetConfigInfo();
- this.GetWarehouseOut();
- this.fetchAllAdminUsers();
- },
- data() {
- var checkGoodId = (rule, value, callback) => {
- setTimeout(() => {
- if (value == "" || value == 0) {
- return callback(new Error("规格名称不能为空"));
- }
- }, 2000);
- };
- return {
- searchKey: "",
- crumbs: [
- { path: false, name: "库存管理" },
- { path: false, name: "出库单" },
- ],
- page: 1,
- limit: 5,
- checked: false,
- total: 0,
- pageTotal: 0,
- pageSelect: 0,
- check_id: 0,
- adminUserOptions: [],
- multipleSelection: [],
- signAndWeighBoxPatients: "sign-and-weigh-box-patients",
- start_time: "",
- warehouseOutDate: [],
- end_time: "",
- goodType: [],
- goodInfo: [],
- manufacturer: [],
- selectedTableData: [],
- dealer: [],
- type: 1,
- drug_id: 0,
- dialogVisible: false,
- editdialogVisible: false,
- warehousingOutInfo: {
- loading: false,
- warehousingOutData: [],
- info: {},
- },
- userList: [],
- type_name: "",
- specification_name: "",
- stockCount: [],
- editDialogVisible: false,
- warehouse_out_time: "",
- form: {
- manufacturer: 0,
- dealer: 0,
- },
- warehouseInfoList: [],
- tableRules: {
- price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
- warehousing_count: [
- { required: true, message: "数量不能为空", trigge: "blur" },
- ],
-
- good_id: [{ validator: checkGoodId, trigger: "blur" }],
- },
-
- recordInfo: {
- recordData: [],
- stock_in_code: "",
- current_index: "",
- },
- propForm: {
- goods: [],
- goodType: [],
- goodInfo: [],
- goodUnit: [],
- title: "入库",
- manufacturer: 0,
- dealer: 0,
- },
- isVisibility: false,
- good_type_id: "",
- tableShow: false,
- tableList: [],
- dialogVisibleTwo: false,
- userList: [],
- editdialogVisibleTwo: false,
- editdialogVisibleThree: false,
- order_id: "",
- warehouse_out_time: "",
- exportList: [],
- is_sys: 0,
- infoList: [],
- stockFlowList: [],
- list: [],
- houselist: [],
- storehouse_id: 0,
- is_sys: 0,
- way_type: 0,
- wayList: [
- { id: 0, name: "全部" },
- { id: 1, name: "手动出库" },
- { id: 2, name: "自动出库" },
- { id: 3, name: "调拨出库" },
- { id: 5, name:"结算出库" }
- ],
- check_type:0,
- checkList:[
- {id:0,name:"全部"},
- {id:1,name:"已审核"},
- {id:2,name:"未审核"},
- ],
- check_id: 0,
- flowList:[],
- cancelInfoList:[],
- exportLoding:false,
- patients:[]
- };
- },
- methods: {
- changeTypeName() {
- this.getlist();
- },
- // getlist() {
-
- // var params = {
- // check_id: this.check_id,
- // start_time: this.start_time,
- // end_time: this.end_time,
- // keyword: this.keywords,
- // page: this.page,
- // limit: this.limit,
- // };
- // getAllSecondOrderList(params).then((response) => {
- // if (response.data.state == 1) {
-
- // var list = response.data.data.list;
- // this.tableList = list;
- // var total = response.data.data.total;
- // this.total = total;
- // this.houseList = response.data.data.houseList;
- // this.doctorList = response.data.data.doctorList;
- // }
- // });
- // },
- search: function () {
- const Params = {
- page: this.page,
- limit: this.limit,
- start_time: this.start_time,
- end_time: this.end_time,
- type: this.type,
- keywords: this.searchKey,
- storehouse_id: this.storehouse_id,
- way_type: this.way_type,
- check_type:this.check_type,
- };
- this.warehouseOutDate = [];
- getWarehouseOutList(Params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.total = response.data.data.total;
- for (let i = 0; i < response.data.data.list.length; i++) {
- this.warehouseOutDate.push(response.data.data.list[i]);
- }
-
- }
- });
- },
- AddNewOrder: function () {
- this.$router.push({
- name: "stockOutOrderAdd",
- query: { type: this.type },
- });
- },
- GetWarehouseOut: function () {
- const Params = {
- page: this.page,
- limit: this.limit,
- start_time: this.start_time,
- end_time: this.end_time,
- type: this.type,
- storehouse_id: this.storehouse_id,
- way_type: this.way_type,
- check_type:this.check_type,
- };
- this.warehouseOutDate = [];
- getWarehouseOutList(Params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.total = response.data.data.total;
- for (let i = 0; i < response.data.data.list.length; i++) {
- this.warehouseOutDate.push(response.data.data.list[i]);
- }
- var obj = { id: 0, storehouse_name: "全部" };
- this.houselist = [];
- this.houselist.push(obj);
- for (let i = 0; i < response.data.data.houselist.length; i++) {
- this.houselist.push(response.data.data.houselist[i]);
- }
- var objOne = {id:0,name:"系统"}
- this.patients.push(objOne)
- for(let i=0;i<response.data.data.patients.length;i++){
- this.patients.push(response.data.data.patients[i])
- }
- }
- });
- },
- getXuserName(id) {
- if (id <= 0) {
- return "";
- }
- var name = "";
- if (
- this.adminUserOptions == null ||
- typeof this.adminUserOptions.length === "undefined"
- ) {
- return name;
- }
- var leng = this.adminUserOptions.length;
- if (leng == 0) {
- return name;
- }
- for (let index = 0; index < leng; index++) {
- if (this.adminUserOptions[index].id == id) {
- name = this.adminUserOptions[index].name;
- break;
- }
- }
- return name;
- },
- fetchAllAdminUsers() {
- fetchAllAdminUsers().then((response) => {
- if (response.data.state == 1) {
- this.adminUserOptions = response.data.data.users;
- var alen = this.adminUserOptions.length;
- for (let index = 0; index < alen; index++) {
- if (this.adminUserOptions[index].user_type == 2) {
- // this.doctorOptions.push(this.adminUserOptions[index]);
- }
- }
- }
- });
- },
- handleSelectionChange: function (val) {
- this.multipleSelection = val;
- },
- handleSizeChange(val) {
- this.limit = val;
- this.GetWarehouseOut();
- },
- handleCurrentChange(val) {
- this.page = val;
- this.GetWarehouseOut();
- },
- startTimeChange(val) {
- var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
- if (time > 0) {
- this.$message.error("结束时间不能小于开始时间");
- this.start_time = "";
- } else {
- this.GetWarehouseOut();
- this.getlist();
- }
- },
- endTimeChange(val) {
- var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
- if (time < 0) {
- this.$message.error("结束时间不能小于开始时间");
- this.end_time = "";
- } else {
- this.GetWarehouseOut();
- this.getlist();
- }
- },
- getTimestamp(time) {
- // 把时间日期转成时间戳
- return new Date(time).getTime() / 1000;
- },
- calculate: function (val) {
- return Math.round(parseFloat(val) * 100) / 100;
- },
- GetConfigInfo: function () {
- GetAllConfig().then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.manufacturer = response.data.data.manufacturer;
- this.dealer = response.data.data.dealer;
- this.goodInfo = response.data.data.goodInfo;
- this.goodType = response.data.data.goodType;
- this.list = response.data.data.list;
- // this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
- // this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
- this.getlist();
- }
- });
- },
- getManufactuerName: function (manufacturer_id) {
- for (let i = 0; i < this.manufacturer.length; i++) {
- if (this.manufacturer[i].id == manufacturer_id) {
- return this.manufacturer[i].manufacturer_name;
- }
- }
- },
- getDealerName: function (dealer_id) {
- for (let i = 0; i < this.dealer.length; i++) {
- if (this.dealer[i].id == dealer_id) {
- return this.dealer[i].dealer_name;
- }
- }
- },
- handleEdit: function (index, row) {
- this.$router.push({
- path:
- "/stock/stockoutorderedit?id=" +
- row.id +
- "&is_sys=" +
- row.is_sys +
- "&supply_cancel_out_id=" +
- row.supply_cancel_out_id+
- "&type="+row.type+"&is_check="+row.is_check,
- });
- },
- handleDelete: function (index, row) {
- if (row.is_sys == 12) {
- this.$message.error("调拨出库数据不能删除!");
- return false;
- }
- if (row.is_sys == 5) {
- this.$message.error("结算出库数据不能删除!");
- return false;
- }
- if (row.supply_cancel_out_id > 0) {
- this.$message.error("采购出库数据不能删除!");
- return false;
- }
- if(row.is_check == 1){
- this.$message.error("已审核的单据不能删除!")
- return false
- }
- const ids = [];
- ids.push(row.id);
- const idStr = ids.join(",");
-
- const params = {
- ids: idStr,
- };
-
- this.$confirm("确认删除出库单记录?", "删除出库单记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- deleteWarehouseOut(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$notify({
- title: "成功",
- message: "删除成功",
- type: "success",
- duration: 2000,
- });
- for (let i = 0; i < ids.length; i++) {
- for (let y = 0; y < this.warehouseOutDate.length; y++) {
- if (ids[i] == this.warehouseOutDate[y].id) {
- this.warehouseOutDate.splice(y, 1);
- }
- }
- }
- }
- });
- })
- .catch(() => {});
- },
- changeAllSelected: function (val) {
- if (val) {
- this.$refs.multipleTable.toggleAllSelection();
- } else {
- this.$refs.multipleTable.clearSelection();
- }
- },
- select(selection) {
- var ids = [];
- for (let i = 0; i < selection.length; i++) {
- ids.push(selection[i].id);
- }
-
- this.exportList = [];
- this.order_id = ids.join(",");
- if(selection.length >0){
- this.warehouse_out_time = selection[0].warehouse_out_time;
- }
- this.selectedTableData = selection;
- this.getlist();
- },
- batchDelete() {
- if (this.selectedTableData.length <= 0) {
- this.$message.error("请选择要删除的记录");
- return;
- }
- const ids = [];
- const idOne = [];
- for (let i = 0; i < this.selectedTableData.length; i++) {
-
- if(this.selectedTableData[i].is_check == 1){
- this.$message.error("已审核单据不能删除!")
- return false
- }
- if (this.selectedTableData[i].is_sys == 1) {
- this.$message.error("自动出库数据不能删除!");
- return false;
- }
- if (this.selectedTableData[i].is_sys == 5) {
- this.$message.error("结算出库数据不能删除!");
- return false;
- }
- if (this.selectedTableData[i].is_sys == 12) {
- this.$message.error("调拨出库数据不能删除!");
- return false;
- }
- if (this.selectedTableData[i].is_sys == 0) {
- ids.push(this.selectedTableData[i].id);
- if(this.selectedTableData[i].supply_cancel_out_id >0){
- idOne.push(this.selectedTableData[i].supply_cancel_out_id);
- }
-
- }
- }
- if (idOne.length > 0) {
- this.$message.error("采购出库数据不能删除!");
- return false;
- }
- const idStr = ids.join(",");
- const params = {
- ids: idStr,
- };
- this.$confirm("确认删除出库单记录?", "删除出库单记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- deleteWarehouseOut(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$notify({
- title: "成功",
- message: "删除成功",
- type: "success",
- duration: 2000,
- });
-
- for (let i = 0; i < ids.length; i++) {
- for (let y = 0; y < this.warehouseOutDate.length; y++) {
- if (ids[i] == this.warehouseOutDate[y].id) {
- this.warehouseOutDate.splice(y, 1);
- }
- }
- }
- }
- });
- })
- .catch(() => {});
- },
-
- handleSearch(val) {
-
- this.is_sys = val.is_sys;
- this.tableList = [];
- this.editdialogVisibleThree = false;
- this.GetOrderDetailOne(val.id,val.warehouse_out_time);
-
- this.GetTotalCount(val.warehouse_out_time);
- },
-
- GetOrderDetailOne(id,warehouse_out_time) {
- const params = {
- id: id,
- warehouse_out_time:warehouse_out_time,
- };
- getOrderDetailByOrderId(params).then((response) => {
- if (response.data.state == 1) {
- this.tableShow = true;
- var list = response.data.data.list;
- this.flowList = response.data.data.stockFlowList
- console.log("出库数据233223232323wo",this.flowList)
- this.stockFlowListGroup = response.data.data.stockFlowListGroup
- console.log("分组2332223233wode",this.stockFlowListGroup)
- var cancelInfolist = response.data.data.cancelInfolist
- this.cancelInfoList = cancelInfolist
-
- this.tableList = [];
- var tableArr = []
- for (let i = 0; i < list.length; i++) {
- list[i].child= []
- list[i].childOne = []
- list[i].childTwo= []
- for(let z=0;z<this.stockFlowListGroup.length;z++){
- if(list[i].good_id == this.stockFlowListGroup[z].good_id){
- list[i].childTwo.push(this.stockFlowListGroup[z])
- }
- }
- for(let j=0;j<this.flowList.length;j++){
- if(list[i].good_id == this.flowList[j].good_id){
- list[i].child.push(this.flowList[j])
- }
- }
-
- tableArr.push(list[i]);
- }
-
-
- if(tableArr!=null && tableArr.length>0){
- for(let i=0;i<tableArr.length;i++){
- for(let j=0;j<tableArr[i].childTwo.length;j++){
- tableArr[i].childTwo[j].over_count_total = this.getAllStockCount(tableArr[i].child,tableArr[i].childTwo[j].warehousing_id) - this.getCancelInfo(tableArr[i].childTwo[j].warehousing_id,tableArr[i].childTwo[j].good_id)
- }
- }
- }
-
- for(let i=0;i<tableArr.length;i++){
- for(let j=0;j<tableArr[i].childTwo.length;j++){
- if(tableArr[i].childTwo[j].over_count_total >0){
- tableArr[i].childOne.push(tableArr[i].childTwo[j])
- }
- }
- }
- console.log("tableARR",tableArr)
- console.log("tablielist2332323", this.tableList)
- this.tableList = tableArr
-
-
- }
- });
- },
-
- getTypeName: function (id) {
- let name = "";
- for (let i = 0; i < this.goodType.length; i++) {
- if (this.goodType[i].id == id) {
- name = this.goodType[i].type_name;
- }
- }
- return name;
- },
-
- getTypeNameOne: function (id) {
- let name = "";
- for (let i = 0; i < this.goodInfo.length; i++) {
- if (this.goodInfo[i].id == id) {
- name = this.goodInfo[i].good_name;
- }
- }
- return name;
- },
-
- getSpecificationName: function (id) {
- let name = "";
- for (let i = 0; i < this.goodInfo.length; i++) {
- if (this.goodInfo[i].id == id) {
- name = this.goodInfo[i].specification_name;
- }
- }
- return name;
- },
- getManufactuerName: function (manufacturer_id) {
- for (let i = 0; i < this.manufacturer.length; i++) {
- if (this.manufacturer[i].id == manufacturer_id) {
- return this.manufacturer[i].manufacturer_name;
- }
- }
- },
-
- jump(id) {
- this.userList = [];
- this.GetOrderDetail(id);
- },
-
- GetOrderDetail: function (order_id) {
- this.userList = [];
- const params = {
- id: order_id,
- };
- getWarehouseOutUser(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- var total = 0;
- var list = response.data.data.list;
- var arrList = this.unique(list);
- for (let i = 0; i < arrList.length; i++) {
- var obj = arrList[i];
- obj["is_total"] = 0;
- this.userList.push(obj);
- total = total + arrList[i].count;
- }
- this.userList.push({
- is_total: 1,
- total: total,
- });
-
- this.editdialogVisibleThree = true;
- }
- });
- },
-
- deleteRecord: function () {
- const ids = [];
- ids.push(this.warehousingOutInfo.info.id);
- const idStr = ids.join(",");
-
- const params = {
- ids: idStr,
- };
-
- this.$confirm("确认删除出库单?", "删除出库单记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- deleteWarehouseOut(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$notify({
- title: "成功",
- message: "删除成功",
- type: "success",
- duration: 2000,
- });
-
- this.$router.back(-1);
- }
- });
- })
- .catch(() => {});
- },
-
- GetTotalCount(time) {
- var params = {
- warehouse_out_time: time,
- };
- GetOutStockTotalCount(params).then((response) => {
- if (response.data.state == 1) {
- var stockCount = response.data.data.stockCount;
-
- this.stockCount = stockCount;
- }
- });
- },
-
- getOutStockCount(id) {
- var count = 0;
- for (let i = 0; i < this.stockCount.length; i++) {
- if (id == this.stockCount[i].good_id) {
- count = this.stockCount[i].count;
- }
- }
- return count;
- },
-
- unique(arr) {
- const res = new Map();
- return arr.filter(
- (arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1)
- );
- },
-
- editRecord(id) {
- this.warehouseOut = [];
- this.recordInfo.recordData = [];
- this.GetConfigInfo();
- this.GetOrderDetailTwo(id);
- this.good_type_id = id;
- },
-
- GetOrderDetailTwo(order_id) {
- const params = {
- id: order_id,
- };
-
- getWarehouseOutInfo(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- for (let i = 0; i < response.data.data.list.length; i++) {
- response.data.data.list[i].price =
- response.data.data.list[i].price.toString();
- response.data.data.list[i].count =
- response.data.data.list[i].count.toString();
- this.recordInfo.recordData.push(response.data.data.list[i]);
- }
- this.warehouseOut = response.data.data.info;
- this.warehouse_out_time = this.getTime(
- this.warehouseOut.warehouse_out_time,
- "{y}-{m}-{d}"
- );
- // this.form.manufacturer = this.warehouseOut.manufacturer
- // this.form.dealer = this.warehouseOut.dealer
- this.editDialogVisible = true;
- }
-
- if (this.recordInfo.recordData.length == 0) {
- const tempObj = {};
- tempObj["id"] = 0;
- tempObj["good_type_id"] = 0;
- tempObj["good_id"] = 0;
- tempObj["count"] = "";
- tempObj["price"] = "";
- tempObj["remark"] = "";
- this.recordInfo.recordData.push(tempObj);
- this.editDialogVisible = true;
- }
- });
- },
- getTime(val, temp) {
- if (val > 0) {
- return uParseTime(val, temp);
- } else {
- return "";
- }
- },
- changeManufacturer(val) {
- this.propForm.manufacturer = val;
- },
- changeDealer(val) {
- this.propForm.dealer = val;
- },
- typeName: function (good_type_id) {
- let name = "";
- for (let i = 0; i < this.goodType.length; i++) {
- if (this.goodType[i].id == good_type_id) {
- name = this.goodType[i].type_name;
- }
- }
- return name;
- },
- specificationName: function (good_info_id) {
- let name = "";
- for (let i = 0; i < this.goodInfo.length; i++) {
- if (this.goodInfo[i].id == good_info_id) {
- name = this.goodInfo[i].specification_name;
- }
- }
- return name;
- },
- handleEditOne() {
- const tempObj = {};
- tempObj["id"] = 0;
- tempObj["good_type_id"] = 0;
- tempObj["good_id"] = 0;
- tempObj["count"] = "";
- tempObj["price"] = "";
- tempObj["remark"] = "";
- this.recordInfo.recordData.push(tempObj);
- },
- handleDeleteOne: function (index, row) {
- if (row.id == 0) {
- this.recordInfo.recordData.splice(index, 1);
- } else {
- const params = {
- id: row.id,
- };
- this.$confirm("确认删除该出库耗材信息记录?", "删除出库耗材信息记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- deleteWarehouseOutInfo(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$message.success("删除成功");
-
- this.recordInfo.recordData.splice(index, 1);
- }
- });
- })
- .catch(() => {});
- }
- },
- showDialog(index, row) {
- this.currentIndex = index;
- const loading = this.$loading({
- lock: true,
- text: "Loading",
- spinner: "el-icon-loading",
- background: "rgba(0, 0, 0, 0.7)",
- });
-
- const params = {
- manufacturer_id: this.form.manufacturer,
- dealer_id: this.form.dealer,
- };
- this.propForm.goods = [];
-
- GetAllGoodInfoByID(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- if (response.data.data.goodInfo.length <= 0) {
- this.$message.error("该厂商或经销商没有物品信息");
- return;
- }
- this.$refs.dialog.show();
- for (let i = 0; i < response.data.data.goodInfo.length; i++) {
- this.propForm.goodType.push(response.data.data.goodInfo[i].type);
- }
- const obj = {};
- this.propForm.goodType = this.propForm.goodType.reduce(
- (cur, next) => {
- obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
- return cur;
- },
- []
- ); // 设置cur默认类型为数组,并且初始值为空的数组
- }
-
- for (let i = 0; i < this.propForm.goodType.length; i++) {
- let goodInfo = [];
- let goodObj = {};
-
- for (let a = 0; a < response.data.data.goodInfo.length; a++) {
- var respObj = response.data.data.goodInfo[a];
- respObj["isSelected"] = false;
- if (respObj.type.id == this.propForm.goodType[i].id) {
- goodInfo.push(respObj);
- }
- }
- const obj = {};
- goodInfo = goodInfo.reduce((cur, next) => {
- obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
- return cur;
- }, []); // 设置cur默认类型为数组,并且初始值为空的数组
-
- this.$set(goodObj, this.propForm.goodType[i].id, goodInfo);
- this.propForm.goods.push(goodObj);
- }
- loading.close();
- });
- },
-
- comfirm: function (val) {
- this.$refs.dialog.hide();
- this.propForm.goodType = [];
- this.propForm.goods = [];
-
- if (val.selectedGoodInfo.length > 0) {
- for (let i = val.selectedGoodInfo.length - 1; ; i--) {
- if (i == 0) {
- this.recordInfo.recordData[this.currentIndex].good_type_id =
- val.selectedGoodInfo[i].good_type_id;
- this.recordInfo.recordData[this.currentIndex].good_id =
- val.selectedGoodInfo[i].id;
- this.recordInfo.recordData[this.currentIndex].price =
- val.selectedGoodInfo[i].buy_price.toString();
- } else {
- const tempForm = {};
- tempForm["id"] = 0;
- tempForm["good_type_id"] = val.selectedGoodInfo[i].good_type_id;
- tempForm["good_id"] = val.selectedGoodInfo[i].id;
- tempForm["count"] = "";
- tempForm["price"] = val.selectedGoodInfo[i].buy_price.toString();
- tempForm["remark"] = "";
- this.recordInfo.recordData.splice(
- this.currentIndex + 1,
- 0,
- tempForm
- );
- }
- }
- }
- this.currentIndex = -1;
- },
- cancle: function () {
- this.$refs.dialog.hide();
- this.propForm.goods = [];
-
- this.propForm.goodType = [];
- },
-
- submit() {
- this.$refs["tableForm"].validate((valid) => {
- if (valid) {
- const array = this.recordInfo.recordData;
-
- for (let i = 0; i < array.length; i++) {
- if (array[i].good_type_id == 0) {
- this.$message.error("商品类型不能为空");
- return;
- }
- if (array[i].good_id == 0) {
- this.$message.error("规格名称不能为空");
- return;
- }
- }
-
- const params = {
- stockOut: this.recordInfo.recordData,
- };
- editWarehouseoutInfo(
- params,
- this.warehouse_out_time,
- this.good_type_id,
- 1,
- this.form.manufacturer,
- this.form.dealer
- ).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.$message.success("保存成功");
- this.editDialogVisible = false;
- this.warehousingOutInfo.info = [];
- this.warehousingOutInfo.warehousingOutData = [];
- this.GetOrderDetailOne(this.good_type_id);
- }
- });
- } else {
- return false;
- }
- });
- },
-
- GetOrderDetailById(val) {
- this.userList = [];
- var params = {
- id: val.warehouse_out_id,
- good_id: val.good_id,
- record_time: val.sys_record_time,
- };
- getOrderDetailById(params).then((response) => {
- if (response.data.state == 1) {
- var total = 0;
- var list = response.data.data.list;
- var arrList = this.unique(list);
- var info = response.data.data.info;
- this.infoList = info;
-
- var stockflowlist = response.data.data.stockFlowList;
-
- this.stockFlowList = stockflowlist;
-
- var cancelInfo = response.data.data.cancelInfo
- console.log("哈哈哈哈哈",this.stockFlowList)
-
-
-
- let dataInfo = {}
- if(this.stockFlowList.length > 0){
- this.stockFlowList.forEach((item, index) => {
- let { patient_id } = item
- if (!dataInfo[patient_id]) {
- dataInfo[patient_id] = {
- patient_id,
- child: [],
- name:item.name,
- ctime:item.ctime,
- count:0,
- cancel_count:0,
- is_sys:item.is_sys,
- }
- }
- })
- let arr = Object.values(dataInfo)
- console.log("arr2332323232wode",arr)
- if(arr!=null && arr.length > 0){
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<this.stockFlowList.length;j++){
- if(arr[i].patient_id == this.stockFlowList[j].patient_id){
- arr[i].child.push(this.stockFlowList[j])
- }
- }
- }
- }
-
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<arr[i].child.length;j++){
- arr[i].count += arr[i].child[j].count
- }
- }
- var newArrOne = []
- if(cancelInfo!=null && cancelInfo.length > 0){
-
- let dataInfoOne = {}
- if(this.stockFlowList.length > 0){
- this.stockFlowList.forEach((item, index) => {
- let { patient_id } = item
- if (!dataInfoOne[patient_id]) {
- dataInfoOne[patient_id] = {
- patient_id,
- child: [],
- name:item.name,
- ctime:item.ctime,
- count:0,
- is_sys:item.is_sys,
- }
- }
- })
- }
- let newArr = Object.values(dataInfoOne)
- if(newArr!=null && newArr.length > 0){
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<cancelInfo.length;j++){
- if(cancelInfo[j].patient_id > 0){
- if(newArr[i].patient_id == cancelInfo[j].patient_id){
- newArr[i].child.push(cancelInfo[j])
- }
- }
-
- }
- }
- }
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<newArr[i].child.length;j++){
- newArr[i].count+=newArr[i].child[j].count
- }
- }
- newArrOne = newArr
- }
-
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<newArrOne.length;j++){
- if(arr[i].patient_id == newArrOne[j].patient_id){
- arr[i].cancel_count = newArrOne[j].count
- }
- }
- }
- console.log("2o32o3o3232j32oo23o2332oj2wo",arr)
- var arrTwo= []
- for(let i=0;i<arr.length;i++){
- if((arr[i].count - arr[i].cancel_count) >0){
- arrTwo.push(arr[i])
- }
- }
- console.log("arrTwo8888888",arrTwo)
- for (let i = 0; i <arrTwo.length; i++) {
- var obj = arrTwo[i];
- obj["is_total"] = 0;
-
- this.userList.push(obj);
- if(arrTwo[i].is_sys == 1){
- total = total + arrTwo[i].count - arrTwo[i].cancel_count;
- }else{
- total = total + arrTwo[i].count;
- }
-
- }
-
-
-
- this.userList.push({
- is_total: 1,
- total: total,
- });
- if (val.is_sys == 1) {
- this.editdialogVisibleThree = true;
- }
- if (val.is_sys == 0 || val.is_sys == 5) {
- this.editdialogVisibleTwo = true;
- }
-
- console.log("我的世界332323223我",this.userList)
- }
-
-
- }
- });
- },
- getNumber(id) {
- var str = "";
- var arr = [];
- var ids = [];
- for (let i = 0; i < this.userList.length; i++) {
- if (id == this.userList[i].id) {
- arr.push(...this.userList[i].warehouseOutInfo);
- }
- }
-
- if (arr.length > 0) {
- for (let i = 0; i < arr.length; i++) {
- ids.push(arr[i].number);
- }
- }
- str = ids.join(",");
- return str;
- },
- toPrint() {
- if (this.order_id == "") {
- this.$message.error("请选择出库单");
- } else {
- this.$router.push({
- path:
- "/stock/out/detail/print?id=" +
- this.order_id +
- "&warehouse_out_time=" +
- this.warehouse_out_time +
- "&keyword=" +
- this.searchKey +
- "&start_time=" +
- this.start_time +
- "&end_time=" +
- this.end_time,
- });
- }
- },
- getlist() {
- this.exportLoding = true
- var params = {
- id: this.order_id,
- start_time: this.start_time,
- end_time: this.end_time,
- };
- getOutExportList(params).then((response) => {
- if (response.data.state == 1) {
- var list = response.data.data.list;
- var outCount = response.data.data.outCount;
-
- for (let i = 0; i < list.length; i++) {
- list[i].unit = list[i].specification_name + "/" + list[i].packing_unit;
- list[i].total_price = (list[i].total_count * list[i].price).toFixed(2);
- list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{m}-{d}");
- list[i].product_date = this.getTime(list[i].product_date,"{y}-{m}-{d}");
-
- for (let j = 0; j < this.manufacturer.length; j++) {
- if (list[i].manufacturer == this.manufacturer[j].id) {
- list[i].manufacturer = this.manufacturer[j].manufacturer_name;
- }
- }
- for (let z = 0; z < this.dealer.length; z++) {
- if (list[i].dealer == this.dealer[z].id) {
- list[i].dealer = this.dealer[z].dealer_name;
- }
- }
- for (let a = 0; a < this.goodType.length; a++) {
- if (list[i].good_type_id == this.goodType[a].id) {
- list[i].good_type_id = this.goodType[a].type_name;
- }
- }
- }
- console.log("list232332232332323223",list)
- this.exportList = list;
- this.exportLoding = false
- }
- });
- },
- toExport() {
- if (this.order_id == "") {
- this.$message.error("请勾选出库单");
- return;
- }
- console.log("时间",this.exportList)
-
- import("@/vendor/Export2Excel").then((excel) => {
- for (let i = 0; i < this.exportList.length; i++) {
- this.exportList[i].total_price =
- this.exportList[i].count * this.exportList[i].price;
- for (let j = 0; j < this.goodType.length; j++) {
- if (this.exportList[i].good_type_id == this.goodType[j].id) {
- this.exportList[i].good_type_id = this.goodType[j].type_name;
- }
- }
- if (this.exportList[i].dealer == 0) {
- this.exportList[i].dealer = "";
- }
- if (this.exportList[i].manufacturer == 0) {
- this.exportList[i].manufacturer = "";
- }
- if (this.exportList[i].good_type_id == 0) {
- this.exportList[i].good_type_id = "";
- }
- this.exportList[i].ctime = this.getTime(this.exportList[i].ctime, "{y}-{m}-{d}")
- this.exportList[i].warehouse_out_time = this.getTime(this.exportList[i].warehouse_out_time,"{y}-{m}-{d}")
- }
-
- const tHeader = [
- "单据日期",
- "耗材名称",
- "耗材类型",
- "规格&单位",
- "出库数量",
- "出货价",
- "总价",
- "生产厂商",
- "经销商",
- "生产日期",
- "有效期",
- "备注",
- "出库时间"
- ];
- const filterVal = [
- "warehouse_out_time",
- "good_name",
- "good_type_id",
- "unit",
- "count",
- "price",
- "total_price",
- "manufacturer",
- "dealer",
- "product_date",
- "expiry_date",
- "remark",
- "ctime",
- ];
-
- const data = this.formatJson(filterVal, this.exportList);
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: "耗材出库单详情",
- });
- this.downloadLoading = false;
- });
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map((v) => filterVal.map((j) => v[j]));
- },
- unique(arr) {
- let newArr = [arr[0]];
- for (let i = 1; i < arr.length; i++) {
- let repeat = false;
- for (let j = 0; j < newArr.length; j++) {
- if (arr[i] === newArr[j]) {
- repeat = true;
- break;
- } else {
- }
- }
- if (!repeat) {
- newArr.push(arr[i]);
- }
- }
- return newArr;
- },
- getBatchNumber(patient_id, good_id) {
- var arr = [];
- for (let i = 0; i < this.stockFlowList.length; i++) {
- if (
- patient_id == this.stockFlowList[i].patient_id &&
- good_id == this.stockFlowList[i].good_id
- ) {
- arr.push(this.stockFlowList[i].number);
- }
- }
- arr = this.unique(arr);
- return arr.join(",");
- },
- getHouseName(id) {
- var storehouse_name = "";
- for (let i = 0; i < this.houselist.length; i++) {
- if (id == this.houselist[i].id) {
- storehouse_name = this.houselist[i].storehouse_name;
- }
- }
- if (storehouse_name == "全部") {
- return "";
- } else {
- return storehouse_name;
- }
- },
- changeStoreHouse() {
- this.GetWarehouseOut();
- },
- changeWay() {
- this.GetWarehouseOut();
- },
- changeCheckType(){
- this.GetWarehouseOut()
- },
- getAllStockCount(val,warehousing_id){
- var arr=[]
- var total_count = 0
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0) {
- for(let j=0;j<arr.length;j++){
- total_count +=arr[j].count
- }
- }
- if(total_count > 0){
- return total_count
- }else{
- return total_count
- }
- },
- getAllStockCountPrice(val,warehousing_id){
- var price = 0
- var arr = []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- return arr[0].price
- }else{
- return 0
- }
- },
- getManufactuerNameSix(val,warehousing_id){
- var manufacturer_name = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- manufacturer_name = this.getManufactuerName(arr[0].manufacturer)
- }
- return manufacturer_name
- },
- getDealerNameSix(val,warehousing_id){
- var dealer_name = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- dealer_name = this.getDealerName(arr[0].xt_warehouse_info.dealer)
- }
- return dealer_name
- },
- getProductDate(val,warehousing_id){
- var product_date = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- product_date = this.getTime(arr[0].product_date, "{y}-{m}-{d}")
- }
- return product_date
- },
- getExpiryDate(val,warehousing_id){
- var expiry_date = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- expiry_date = this.getTime(arr[0].xt_warehouse_info.expiry_date, "{y}-{m}-{d}")
- }
- return expiry_date
- },
- getRegisterNumber(val,warehousing_id){
- var register_number = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- register_number = arr[0].xt_warehouse_info.register_number
- }
- return register_number
- },
- getRemark(val,warehousing_id){
- var remark = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- remark = arr[0].xt_warehouse_info.remark
- }
- return remark
- },
- getNumber(val,warehousing_id){
- var number = ""
- var arr= []
- if(val!=null&&val.length > 0){
- for(let i=0;i<val.length;i++){
- if(val[i].warehousing_id == warehousing_id){
- arr.push(val[i])
- }
- }
- }
- if(arr.length > 0){
- number = arr[0].number
- }
- return number
- },
- // 合并单元格样式
- cellStyle({ row, column, rowIndex, columnIndex }) {
- let arr = [3,4,5,6,7,8,9,10,11,12,13];
- if (arr.indexOf(columnIndex) > -1) {
- return "spanClass";
- }
- },
- getCancelInfo(warehousing_id,good_id){
-
- var count =0
- var arr = []
- for(let i=0;i<this.cancelInfoList.length;i++){
-
- if(this.cancelInfoList[i].patient_id >0 && warehousing_id == this.cancelInfoList[i].warehousing_id && good_id == this.cancelInfoList[i].good_id){
- arr.push(this.cancelInfoList[i])
- }
- }
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- count += arr[i].count
- }
- }
- if(count > 0){
- return count
- }else{
- return 0
- }
-
-
- },
- getRow(row){
- console.log("row233323232",row)
- var name = ""
- if(this.stockFlowList!=null && this.stockFlowList.length > 0){
- for(let i=0;i<this.stockFlowList.length;i++){
- if(row.patient_id == this.stockFlowList[i].patient_id){
- name = this.stockFlowList[i].name
- }
- }
- }
-
- return name
- },
- getPatientName(patient_id){
- var name = ""
- for(let i=0;i<this.patients.length;i++){
- if(patient_id == this.patients[i].id){
- name = this.patients[i].name
- }
- }
- return name
- }
- },
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss">
- .app-container {
- // margin: 20px;
- font-size: 15px;
- .filter-container {
- padding-bottom: 5px;
- }
- .search-component {
- width: 500px;
- .searchBox {
- width: 300px;
- height: 36px;
- line-height: 36px;
- padding-left: 15px;
- border: 1px #dcdfe6 solid;
- border-right: none;
- outline: none;
- float: left;
- border-radius: 6px 0 0 6px;
- font-size: 14px;
- color: #333;
- background: #fff;
- box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
- }
- .searchBtn {
- background-color: #409eff;
- color: #fff;
- font-size: 15px;
- text-align: center;
- height: 36px;
- line-height: 36px;
- float: left;
- outline: none;
- width: 70px;
- border: none;
- border-radius: 0 6px 6px 0;
- font-family: "Microsoft Yahei";
- cursor: pointer;
- }
- }
-
- .amount {
- font-weight: normal;
- padding: 10px 0 0 0;
- color: #606266;
- font-size: 14px;
- span {
- color: #ef2525;
- font-family: "Arial";
- padding: 0 2px;
- }
- }
- }
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- </style>
-
- <style>
- .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
- font-size: 12px;
- }
-
- .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
- background: #6fb5fa;
- }
-
- .count {
- color: #bd2c00;
- }
-
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
-
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
-
- /* 合并表格线样式 */
- .spanClass .cell {
- padding: 0 !important;
- }
-
- .spanClass .cell tr {
- display: inline-block;
- width: 100%;
- }
-
- .spanClass .cell tr td {
- padding: 10px 0;
- border-bottom: 1px solid #ebeef5;
- display: block;
- width: 100%;
- }
- .spanClass .cell tr:last-of-type td {
- border-bottom: none;
- }
- </style>
|