123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457 |
- <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
- @current-change="handleSearch"
- :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',
- }"
- >
- <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 min-width="40" align="center">
- <template slot="header" slot-scope="scope">
- <span>出库方式</span>
- </template>
- <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 min-width="40" align="center">
- <template slot="header" slot-scope="scope">
- <span>审核状态</span>
- </template>
- <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="240">
- <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.drug_name }}
- </template>
- </el-table-column>
- <el-table-column label="药品类型" align="center">
- <template slot-scope="scope">
- {{ getDrugType(scope.row.drug_type) }}
- </template>
- </el-table-column>
- <el-table-column label="规格&单位" align="center">
- <template slot-scope="scope">
- {{ scope.row.dose }} {{ scope.row.dose_unit }}*{{
- scope.row.min_number
- }}{{ scope.row.min_unit }}/{{ scope.row.max_unit }}
- </template>
- </el-table-column>
- <el-table-column label="国家编码" align="center">
- <template slot-scope="scope">
- {{ scope.row.medical_insurance_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">
-
- <tr style="background: none" v-for="(item,index) in scope.row.child" :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.child" :key="index">
- <td style="border-right: none; border-inline-end:none;text-align: center">
- <span v-if="is_sys==1 || is_sys == 5">{{getOutCountSix(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_id)}}</span>
- <span v-if="is_sys == 12">{{getOutCountTen(item.count,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0"> {{getOutCountOne(item.batch_number,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_id)}} </span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end:none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5">
- {{getBatchNumber(item.warehousing_detail_id)}}
- </span>
- <span v-if="is_sys == 12">{{getBatchNumber(item.warehousing_detail_id)}}</span>
- <span v-if="is_sys == 0">{{getBatchNumberOne(item.batch_number)}}</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.child" :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">
- <template slot-scope="scope">
- <tr style="background: none" v-for="(item,index) in scope.row.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{getPrice(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0">
- <span v-if="scope.row.child.length == 1">
- {{getPriceTwo(item.warehouse_out_id,item.drug_id)}}
- </span>
- <span v-if="scope.row.child.length > 1">
- {{item.price}}
- </span>
-
- </span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="org_id!=0 && org_id!=10480 && org_id!=10210">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{getTotalPrice(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}} </span>
- <span v-if="is_sys == 0">
- <span v-if="scope.row.child.length == 1">{{item.retail_price}}</span>
- <span v-if="scope.row.child.length > 1">{{item.count * item.price}}</span>
- </span>
- </span>
-
- <span v-if="org_id==0 || org_id ==10480 || org_id==10210">
- <!-- {{(item.count * item.price).toFixed(2)}} -->
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{(getOutCountNightTen(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_id)*item.price).toFixed(2)}}</span>
- <span v-if="is_sys==0"> {{(getOutCountNightTenOne(item.batch_number,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_id)*item.price).toFixed(2)}}</span>
- </span>
-
-
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12"> {{getAllManufacturerName(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0"> {{getManufacturerName(scope.row.manufacturer)}}</span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12"> {{getProductDate(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0"> {{getTime(scope.row.product_date)}}</span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12"> {{getExpiryDate(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0"> {{getTime(scope.row.expiry_date)}}</span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys ==1 || is_sys ==5 || is_sys ==12">{{getDealer(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys ==0">{{getDealerName(scope.row.dealer)}}</span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{getNumber(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0">{{scope.row.number}}</span>
- </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.child" :key="index">
- <td style="border-right: none; border-inline-end: none;text-align: center">
- <span v-if="is_sys == 1 || is_sys == 5 || is_sys == 12">{{getRemark(item.warehousing_detail_id,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- <span v-if="is_sys == 0">{{scope.row.remark}}</span>
- </td>
- </tr>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center">
- <template slot-scope="scope">
- <span style="color: #589ff8" @click="toDetail(scope.row)"
- >使用明细</span
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
-
- <el-dialog title="提示" :visible.sync="drugDialogVisible" width="90%">
- <span>
- <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">
- {{ 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">
- {{ scope.row.user.name }}
- </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.count }}{{ scope.row.count_unit }}</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
- >{{ scope.row.ctime | parseTime("{y}-{m}-{d}") }}
- </span>
- </template>
- </el-table-column>
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="drugDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="drugDialogVisible = false"
- >确 定</el-button
- >
- </span>
- </el-dialog>
-
- <el-dialog title="提示" :visible.sync="drugDialogVisibleTwo" width="90%">
- <span>
- <el-table
- :data="userListOne"
- :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">
- {{ 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>系统</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 }}{{ scope.row.count_unit }}
- </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>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="drugDialogVisibleTwo = false">取 消</el-button>
- <el-button type="primary" @click="drugDialogVisibleTwo = false"
- >确 定</el-button
- >
- </span>
- </el-dialog>
- </div>
- </template>
-
- <script>
- import { uParseTime } from "@/utils/tools";
- import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
-
- import {
- deleteDrugWarehouseOut,
- GetAllConfig,
- getDrugWarehouseOutList,
- getDrugWarehouseOutUser,
- getDrugAutoMaticList,
- getSinleOrderDetail,
- getAutoDrugDetail,
- getDrugCountList,
- getExportOutOrderDrugList,
- } from "@/api/drug/drug_stock";
- import BreadCrumb from "../../components/bread-crumb";
- import { getInitializtion } from "@/api/stock";
- export default {
- name: "salesReturnOrder",
- components: { BreadCrumb },
- created() {
- if (this.$route.path == "/Pharmacy/drugs/stock/out") {
- this.crumbs = [
- { path: false, name: "药品管理" },
- { path: "/stock/drugs/stock/query", name: "出库单·" },
- ];
- }
- this.org_id = this.$store.getters.xt_user.org.id;
- 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.GetWarehouseOut();
- this.fetchAllAdminUsers();
- this.getDrugCountList();
- this.getInitializtion();
- },
- data() {
- return {
- searchKey: "",
- crumbs: [
- { path: false, name: "库存管理" },
- { path: false, name: "出库单" },
- ],
- page: 1,
- limit: 5,
- check_id: 0,
- checked: false,
- total: 0,
- pageTotal: 0,
- pageSelect: 0,
- adminUserOptions: [],
- multipleSelection: [],
- signAndWeighBoxPatients: "sign-and-weigh-box-patients",
- start_time: "",
- warehouseOutDate: [],
- end_time: "",
- goodType: [],
- goodInfo: [],
- manufacturer: [],
- selectedTableData: [],
- dealer: [],
- type: 1,
- dialogVisible: false,
- dialogVisibleTwo: false,
- warehousingOutInfo: {
- loading: false,
- warehousingOutData: [],
- info: {},
- },
- userList: [],
- list: [],
- drugConfig: {},
- drugList: [],
- tableList: [],
- drugTypeList: [],
- tableShow: false,
- manufacturerList: [],
- drugDialogVisible: false,
- drugDialogVisibleTwo: false,
- order_id: 0,
- dealerList: [],
- countList: [],
- outCountList: [],
- autoCountList: [],
- keyword: "",
- drug_type: 0,
- minCount: [],
- drugOutList: [],
- outList: [],
- userListOne: [],
- exportList: [],
- batchNumberList: [],
- drugFlowList: [],
- houseList: [],
- storehouse_id: 0,
- is_sys: 0,
- org_id: 0,
- way_type: 0,
- wayList: [
- { id: 0, name: "全部" },
- { id: 1, name: "手动出库" },
- { id: 2, name: "自动出库" },
- { id: 3, name: "调拨出库" },
- { id: 4, name: "结算出库" },
- ],
- check_type:0,
- checkList:[
- {id:0,name:"全部"},
- {id:1,name:"已审核"},
- {id:2,name:"未审核"},
- ],
- tabList:[],
- tabListOne:[],
- drugOutInfo:[],
- warehouseOutList:[],
- exportLoding:false,
- outInfoList:[],
- };
- },
- 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 = [];
- getDrugWarehouseOutList(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]);
- }
- }
- });
- },
- AddNewOrder: function () {
- if (this.$route.path == "/Pharmacy/drugs/stock/out") {
- this.$router.push({
- name: "drugStockOutOrderAdd_Pharmacy",
- query: { type: this.type },
- });
- } else {
- this.$router.push({
- name: "drugStockOutOrderAdd",
- 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,
- keywords: this.searchKey,
- storehouse_id: this.storehouse_id,
- way_type: this.way_type,
- check_type:this.check_type,
- };
- this.warehouseOutDate = [];
- getDrugWarehouseOutList(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]);
- }
- }
- });
- },
- 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();
- }
- },
- endTimeChange(val) {
- var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
- if (time < 0) {
- this.$message.error("结束时间不能小于开始时间");
- this.end_time = "";
- } else {
- this.GetWarehouseOut();
- }
- },
- 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;
- }
- });
- },
-
- handleEdit: function (index, row) {
- this.$router.push({
- path:
- "/drug/out/drugstockoutorderedit?id=" +
- row.id +
- "&type=" +
- this.type +
- "&is_sys=" +
- row.is_sys +
- "&supply_cancel_out_id=" +
- row.supply_cancel_out_id+"&is_check="+row.is_check
-
- });
- },
- handleSearch(val) {
- this.is_sys = val.is_sys;
- this.getInitializtion();
- this.getSinleOrderDetail(val.id, val.warehouse_out_time, val.is_sys);
- this.list = [];
- },
-
- handleDelete: function (index, row) {
- if (row.is_sys == 5) {
- this.$message.error("结算出库数据不能删除!");
- return;
- }
- if (row.is_sys == 12) {
- this.$message.error("调拨出库数据不能删除!");
- return;
- }
- if (row.supply_cancel_out_id > 0) {
- this.$message.error("采购出库数据不能删除!");
- return;
- }
- 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(() => {
- deleteDrugWarehouseOut(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.order_id = ids.join(",");
- this.selectedTableData = selection;
- this.getExportOutOrderDrugList();
- },
- batchDelete() {
-
-
- if (this.selectedTableData.length <= 0) {
- this.$message.error("请选择要删除的记录");
- return;
- }
- const ids = [];
- const idsOne = [];
- 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 == 12) {
- this.$message.error("调拨出库数据不能删除!");
- return false;
- }
- if (this.selectedTableData[i].is_sys == 5) {
- 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){
- idsOne.push(this.selectedTableData[i].supply_cancel_out_id);
- }
-
- }
- }
- if (idsOne.length > 0) {
- this.$message.error("采购出库数据不能删除!");
- return;
- }
- const idStr = ids.join(",");
- const params = {
- ids: idStr,
- };
- this.$confirm("确认删除出库单记录?", "删除出库单记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- deleteDrugWarehouseOut(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(() => {});
- },
-
- jump(id) {
- this.GetOrderDetailTwo(id);
- this.userList = [];
- this.dialogVisibleTwo = true;
- },
-
- GetOrderDetailTwo(order_id) {
- const params = {
- id: order_id,
- };
- getDrugWarehouseOutUser(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.userList = [];
- var total = 0;
-
- for (let i = 0; i < response.data.data.list.length; i++) {
- var obj = response.data.data.list[i];
- obj["is_total"] = 0;
- this.userList.push(obj);
- total = total + response.data.data.list[i].count;
- }
-
- this.userList.push({
- is_total: 1,
- total: total,
- });
- }
- });
- },
- merge({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 0) {
- const _row = this.tempArr[rowIndex];
- const _col = _row > 0 ? 1 : 0;
- return {
- rowspan: _row,
- colspan: _col,
- };
- }
- },
- handleSpanTempArr() {
- this.tempArr = [];
-
- for (
- let i = 0;
- i < this.warehousingOutInfo.warehousingOutData.length;
- i++
- ) {
- if (i === 0) {
- this.tempArr.push(1);
- this.pos = 0;
- } else {
- // 判断当前元素与上一个元素是否相同
- if (
- this.warehousingOutInfo.warehousingOutData[i].drug_id ===
- this.warehousingOutInfo.warehousingOutData[i - 1].drug_id
- ) {
- this.tempArr[this.pos] += 1;
- this.tempArr.push(0);
- } else {
- this.tempArr.push(1);
- this.pos = i;
- }
- }
- }
-
- let sameRowArr = [],
- sIdx = 0;
- this.warehousingOutInfo.warehousingOutData.forEach((item, index) => {
- item.index = index;
- if (index === 0) {
- sameRowArr.push([index]);
- } else {
- if (
- item.drug_id ===
- this.warehousingOutInfo.warehousingOutData[index - 1].drug_id
- ) {
- sameRowArr[sIdx].push(index);
- } else {
- sIdx = sIdx + 1;
- sameRowArr.push([index]);
- }
- }
- });
- this.sameRowArr = sameRowArr;
- },
- // getDrugAutoMaticList(id, recordTime, warehouse_out_order_number) {
- // var params = {
- // warehous_out_id: id,
- // record_time: recordTime,
- // warehouse_out_order_number: warehouse_out_order_number,
- // };
- // getDrugAutoMaticList(params).then((response) => {
- // if (response.data.state == 1) {
- // var list = response.data.data.list;
- // this.list = list;
- // var drugConfig = response.data.data.drugConfig;
-
- // this.drugConfig = drugConfig;
- // var drugList = response.data.data.drugList;
- // this.drugList = drugList;
- // var manulist = response.data.data.manufacturerList;
- // this.manufacturerList = manulist;
- // }
- // });
- // },
- getDrugCount(id) {
- var count = 0;
- for (let i = 0; i < this.list.length; i++) {
- if (this.list[i].drug_id == id) {
- count = this.list[i].Total;
- }
- }
- return count;
- },
- getRetailPrice(id) {
- var price = 0;
- for (let i = 0; i < this.drugList.length; i++) {
- if (id == this.drugList[i].id) {
- price = this.drugList[i].retail_price;
- }
- }
- return price;
- },
- getTime(val) {
- if (val < 0) {
- return "";
- }
- if (val == "") {
- return "";
- } else {
- return uParseTime(val, "{y}-{m}-{d}");
- }
- },
- getInitializtion() {
- getInitializtion().then((response) => {
- if (response.data.state == 1) {
- var drugTypeList = response.data.data.drugTypeList;
-
- this.drugTypeList = drugTypeList;
- }
- });
- },
- getDrugType(id) {
- var name = "";
- for (let i = 0; i < this.drugTypeList.length; i++) {
- if (id == this.drugTypeList[i].value) {
- name = this.drugTypeList[i].name;
- }
- }
- return name;
- },
- getManufacturerName(id) {
- var name = "";
- for (let i = 0; i < this.manufacturerList.length; i++) {
- if (id == this.manufacturerList[i].id) {
- name = this.manufacturerList[i].manufacturer_name;
- }
- }
- return name;
- },
- getDealerName(id) {
- var name = "";
- for (let i = 0; i < this.dealerList.length; i++) {
- if (id == this.dealerList[i].id) {
- name = this.dealerList[i].dealer_name;
- }
- }
- return name;
- },
- getSinleOrderDetail(id, start_time, is_sys) {
- var params = {
- id: id,
- start_time: start_time,
- };
- getSinleOrderDetail(params).then((response) => {
- if (response.data.state == 1) {
- this.tableShow = true;
- this.tableList = [];
- //流水详情
- var list = response.data.data.list;
-
- this.warehouseOutList = list
- this.manufacturerList = response.data.data.manufacturerList;
- this.dealerList = response.data.data.dealerList;
- //详情(xt_drug_automatic_reduce_detail)
- var drugFlowList = response.data.data.drugFlowList;
- //流水详情
- var drugList = response.data.data.drugList
-
- this.tabList = drugList
- //按批号分组
- var drugListOne = response.data.data.drugListFlow
-
- //按批号分组
- var drugListTwo= response.data.data.drugListOne
-
-
- //出库详情
- var drugoutlist = response.data.data.drugoutlist
-
- this.outList = drugoutlist
- this.drugOutInfo = drugoutlist
- if (is_sys == 1) {
- console.log("数据1",drugFlowList)
- console.log("数据2",drugListOne)
- if (drugFlowList.length > 0) {
- for (let i = 0; i < drugFlowList.length; i++) {
- drugFlowList[i].childOne = []
- drugFlowList[i].child = []
- if ((drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.max_unit) && (drugFlowList[i].XtBaseDrug.max_unit!=drugFlowList[i].XtBaseDrug.min_unit)) {
- drugFlowList[i].count =drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number;
- }
- if ((drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.min_unit)&& (drugFlowList[i].XtBaseDrug.max_unit!=drugFlowList[i].XtBaseDrug.min_unit) ) {
- drugFlowList[i].count = drugFlowList[i].count;
- }
- if ((drugFlowList[i].count_unit ==drugFlowList[i].XtBaseDrug.min_unit)&& (drugFlowList[i].XtBaseDrug.max_unit==drugFlowList[i].XtBaseDrug.min_unit) ) {
- drugFlowList[i].count = drugFlowList[i].count;
- }
- for(let j=0;j<drugListOne.length;j++){
- if(drugFlowList[i].drug_id == drugListOne[j].drug_id){
- drugFlowList[i].childOne.push(drugListOne[j])
- }
- }
-
- }
- }
- console.log("以色列",drugFlowList)
- this.drugFlowList = drugFlowList;
- }
-
- if (is_sys == 0 || is_sys == 12 || is_sys == 5) {
- //出库详情
- var flowlist = response.data.data.flowlist;
- this.drugFlowList = [];
- for (let i = 0; i < flowlist.length; i++) {
- flowlist[i].childOne = []
- flowlist[i].child = []
- if (flowlist[i].count_unit == flowlist[i].max_unit) {
- flowlist[i].count = flowlist[i].count * flowlist[i].min_number;
- flowlist[i].count_unit = flowlist[i].min_unit;
- }
- if (flowlist[i].count_unit == flowlist[i].min_unit) {
- flowlist[i].count = flowlist[i].count;
- }
- }
- this.drugFlowList = flowlist;
- }
-
- for (let i = 0; i < list.length; i++) {
- if (list[i].batch_number == "0" || list[i].batch_number == 0) {
- list[i].batch_number = "";
- }
-
- if (list[i].number == "0" || list[i].number == 0) {
- list[i].number = "";
- }
- list[i].child = []
- list[i].childOne = []
- if(list[i].is_sys == 1 ){
- for(let j=0;j<drugListOne.length;j++){
- if(list[i].drug_id == drugListOne[j].drug_id){
- list[i].childOne.push(drugListOne[j])
- }
- }
- }
-
-
- if(list[i].is_sys == 0 || list[i].is_sys == 5 || list[i].is_sys == 12){
- for(let j=0;j<drugListTwo.length;j++){
- if(list[i].drug_id == drugListTwo[j].drug_id){
- list[i].childOne.push(drugListTwo[j])
- }
- }
- }
- }
-
-
- console.log("中故宫人我奶奶万年万年",list)
- if(is_sys == 1 || is_sys == 5){
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].childOne.length;j++){
- list[i].childOne[j].over_count_total = this.getOutCountSix(list[i].childOne[j].warehousing_detail_id,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
- }
- }
-
- console.log("中部listowowowoowowow",list)
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].childOne.length;j++){
- if(list[i].childOne[j].over_count_total !=""){
- list[i].child.push(list[i].childOne[j])
- }
- }
- }
- console.log("list表格---------",list)
- this.tableList = list;
- }
- if(is_sys == 12){
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].childOne.length;j++){
- list[i].childOne[j].over_count_total = this.getOutCountSeven(list[i].childOne[j].warehousing_detail_id,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
- }
- }
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].childOne.length;j++){
- if(list[i].childOne[j].over_count_total !=""){
- list[i].child.push(list[i].childOne[j])
- }
- }
- }
-
- console.log("listowowowowo",list)
- this.tableList = list;
- }
-
- if(is_sys == 0){
- console.log("list999992332232323",list)
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].childOne.length;j++){
- console.log("hhhahhawiiw",this.getOutCountOne(list[i].childOne[j].batch_number,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id))
- list[i].childOne[j].over_count_total = this.getOutCountOne(list[i].childOne[j].batch_number,list[i].max_unit,list[i].min_unit,list[i].min_number,list[i].drug_id)
- }
- }
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].childOne.length;j++){
- if(list[i].childOne[j].over_count_total !=""){
- list[i].child.push(list[i].childOne[j])
- }
- }
- }
- this.tableList = list;
- }
-
-
- }
- });
- },
- toDetail(val) {
- this.userList = [];
- this.userListOne = [];
- var params = {
- warehouse_out_id: val.warehouse_out_id,
- drug_id: val.drug_id,
- record_time: val.sys_record_time,
- };
-
- getAutoDrugDetail(params).then((response) => {
- if (response.data.state == 1) {
- this.userList = response.data.data.list;
-
- if (val.is_sys == 1) {
- this.drugDialogVisible = true;
- }
- if (val.is_sys == 0 || val.is_sys == 12 || val.is_sys == 5) {
- this.drugDialogVisibleTwo = true;
- }
- var userListOne = response.data.data.outList;
-
- this.userListOne = userListOne;
- var batchNumber = response.data.data.batchNumber;
-
- this.batchNumberList = batchNumber;
- }
- });
- },
- toPrint() {
- if (this.order_id == 0) {
- this.$message.error("请选择出库单");
- } else {
- this.$router.push({
- path: "/stock/drugStockOutOrderDetailPrint?id=" + this.order_id,
- });
- }
- },
-
- getDrugCountList() {
- var params = {
- keyword: this.keywords,
- start_time: this.start_time,
- end_time: this.end_time,
- };
-
- getDrugCountList(params).then((response) => {
- if (response.data.state == 1) {
- var countlist = response.data.data.countList;
-
- this.countList = countlist;
- var outcountlist = response.data.data.outCountList;
-
- this.outCountList = outcountlist;
- var aucountlist = response.data.data.auCountList;
-
- this.autoCountList = aucountlist;
- var minCount = response.data.data.minCount;
-
- this.minCount = minCount;
- var info = response.data.data.info;
- for (let i = 0; i < info.length; i++) {
- if (info[i].count_unit == info[i].max_unit) {
- info[i].count = info[i].count * info[i].min_number;
- }
- }
-
- this.drugOutList = info;
- }
- });
- },
-
- getCount(drug_id, min_number, max_unit, min_unit) {
- var count = 0;
- var str = "";
- var min_str = "";
- for (let i = 0; i < this.drugOutList.length; i++) {
- if (drug_id == this.drugOutList[i].drug_id) {
- count += parseInt(this.drugOutList[i].count);
- }
- }
- if (parseInt(count / min_number) != 0) {
- str = parseInt(count / min_number) + max_unit;
- }
- if (count % min_number != 0) {
- min_str = (count % min_number) + min_unit;
- }
- return str + min_str;
- },
- getTotalCount(drug_id, min_number, max_unit, min_unit) {
- var str = "";
- var min_str = "";
- var arr = [];
- var total = 0;
- for (let i = 0; i < this.outList.length; i++) {
- if (this.outList[i].drug_id == drug_id) {
- total += this.outList[i].count;
- }
- }
-
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
-
- if (total < min_number) {
- str = "";
- min_str = total + min_unit;
- }
-
- return str + min_str;
- },
- getTotalCountOne(id, min_number, max_unit, min_unit) {
- var arr = [];
- for (let i = 0; i < this.drugFlowList.length; i++) {
- if (id == this.drugFlowList[i].drug_id) {
- arr.push(this.drugFlowList[i]);
- }
- }
- var str = "";
- var min_str = "";
- var total = 0;
- if (arr.length > 0) {
- for (let i = 0; i < arr.length; i++) {
- total += arr[i].count;
- }
- if (parseInt(total / min_number) != 0) {
- str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return str + min_str;
- },
-
- getAllPrice(drug_id, price, min_price) {
- var strprice = 0;
- var minstrprice = 0;
- var str = "";
- var min_str = "";
- var total_price = 0;
- for (let i = 0; i < this.outList.length; i++) {
- if (this.outList[i].drug_id == drug_id) {
- if (
- parseInt(this.outList[i].count / this.outList[i].min_number) != 0
- ) {
- str = parseInt(this.outList[i].count / this.outList[i].min_number);
- }
- if (this.outList[i].count % this.outList[i].min_number != 0) {
- min_str = this.outList[i].count % this.outList[i].min_number;
- }
- }
- }
- strprice = str * price;
- minstrprice = min_str * min_price;
-
- total_price = strprice + minstrprice;
- return total_price;
- },
- getDrugBatchNumber(drugid, count) {
- var arr = [];
- for (let i = 0; i < this.batchNumberList.length; i++) {
- if (
- drugid == this.batchNumberList[i].drug_id &&
- count == this.batchNumberList[i].count
- ) {
- arr.push(this.batchNumberList[i].batch_number);
- }
- }
- return arr.join(",");
- },
-
- getExportOutOrderDrugList() {
- var params = {
- order_id: this.order_id,
- };
- this.exportLoding = true
- getExportOutOrderDrugList(params).then((response) => {
- if (response.data.state == 1) {
- var list = response.data.data.list;
- if(list!=null){
- for(let i=0;i<list.length;i++){
- list[i].count_one =0
- if(list[i].count_unit == list[i].max_unit && list[i].max_unit!=list[i].min_unit){
- list[i].count_one = list[i].count * list[i].min_number
- }
- if(list[i].count_unit == list[i].min_unit && list[i].max_unit!=list[i].min_unit){
- list[i].count_one = list[i].count
- }
-
- if(list[i].count_unit == list[i].max_unit && list[i].max_unit==list[i].min_unit){
- list[i].count_one = list[i].count
- }
- }
- }
- this.exportList = list;
- this.exportLoding = false
- this.manufacturerList = response.data.data.manufacturerList;
- this.dealerList = response.data.data.dealerList;
- this.outInfoList = response.data.data.outInfoList
- }
- });
- },
- toExport() {
-
- console.log("EXPORTLSOT",this.exportList)
- if (this.order_id == "") {
- this.$message.error("请勾选出库单");
- return;
- }
-
- for (let i = 0; i < this.exportList.length; i++) {
- this.exportList[i].retail_price_one = 0
- if(this.outInfoList.length!=null){
- for(let j=0;j<this.outInfoList.length;j++){
- if(this.exportList[i].warehouse_out_id == this.outInfoList[j].warehouse_out_id && this.exportList[i].drug_id == this.outInfoList[j].drug_id){
- this.exportList[i].retail_price_one = this.outInfoList[j].price
- }
- }
- }
-
- if (this.exportList[i].dealer == 0) {
- this.exportList[i].dealer = "";
- }
- if (this.exportList[i].manufacturer == 0) {
- this.exportList[i].manufacturer = "";
- }
- this.exportList[i].unit =
- this.exportList[i].dose +
- this.exportList[i].dose_unit +
- "*" +
- this.exportList[i].min_number +
- this.exportList[i].min_unit +
- "/" +
- this.exportList[i].max_unit;
-
- // this.exportList[i].total_price = (this.exportList[i].count * this.exportList[i].price).toFixed(2);
- this.exportList[i].out_count = this.getAllOut(this.exportList[i].count,this.exportList[i].max_unit,this.exportList[i].min_unit,this.exportList[i].min_number)
- this.exportList[i].expiry_date = this.getTime(
- this.exportList[i].expire_date
- );
- this.exportList[i].product_date = this.getTime(
- this.exportList[i].product_date
- );
- for (let j = 0; j < this.manufacturerList.length; j++) {
- if (this.exportList[i].manufacturer == this.manufacturerList[j].id) {
- this.exportList[i].manufacturer = this.manufacturerList[j].manufacturer_name;
- }
- }
-
- for (let z = 0; z < this.dealerList.length; z++) {
- if (this.exportList[i].dealer == this.dealerList[z].id) {
- this.exportList[i].dealer = this.dealerList[z].dealer_name;
- }
- }
-
- this.exportList[i].retail_price = (this.exportList[i].count_one * this.exportList[i].min_price).toFixed(2)
-
- this.exportList[i].ctime = this.getTime(this.exportList[i].ctime)
- }
-
- import("@/vendor/Export2Excel").then((excel) => {
- for (let i = 0; i < this.exportList.length; i++) {
- for (let j = 0; j < this.drugTypeList.length; j++) {
- if (this.exportList[i].drug_type == this.drugTypeList[j].value) {
- this.exportList[i].drug_type = this.drugTypeList[j].name;
- }
- }
- }
- const tHeader = [
- "单据日期",
- "药品名称",
- "药品类型",
- "规格&单位",
- "批号",
- "出库数量",
- "单价",
- "拆零零售价",
- "总价",
- "生产厂家",
- "生产日期",
- "有效日期",
- "经销商",
- "批准文号",
- "出库时间",
- "备注",
-
- ];
- const filterVal = [
- "ctime",
- "drug_name",
- "drug_type",
- "unit",
- "batch_number",
- "out_count",
- "retail_price_one",
- "price",
- "retail_price",
- "manufacturer",
- "product_date",
- "expiry_date",
- "dealer",
- "number",
- "ctime",
- "remark",
- ];
-
-
-
- const data = this.formatJson(filterVal, this.exportList);
- console.log("Datewoo2o2o2o",data)
-
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: "药品出库单详情",
- });
- this.downloadLoading = false;
- });
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map((v) => filterVal.map((j) => v[j]));
- },
- getAllPriceOne(
- drug_id,
- price,
- min_price,
- max_unit,
- count_unit,
- min_number,
- is_sys
- ) {
- var total = 0;
- var all_price = 0;
- for (let i = 0; i < this.drugFlowList.length; i++) {
- if (drug_id == this.drugFlowList[i].drug_id) {
- total += this.drugFlowList[i].count;
- }
- }
- if (max_unit == count_unit && is_sys != 0 && is_sys != 12) {
- total = total * min_number;
- }
- all_price = (total / min_number) * price;
-
- return all_price;
- },
- 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;
- }
- }
- return storehouse_name;
- },
- changeStoreHouse() {
- this.GetWarehouseOut();
- },
- changeWay() {
- this.GetWarehouseOut();
- },
- changeCheckType(){
- this.GetWarehouseOut();
- },
- // 合并单元格样式
- cellStyle({ row, column, rowIndex, columnIndex }) {
- let arr = [4,5,6, 7, 8, 9,10,11,12,13,14];
- if (arr.indexOf(columnIndex) > -1) {
- return "spanClass";
- }
- },
- getOutCountSix(warehouse_info_id,max_unit,min_unit,min_number,drug_id){
- var arr = []
- var total = 0
- var max_str = ""
- var min_str = ""
-
- for(let j=0;j<this.outList.length;j++){
- if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
- arr.push(this.outList[j])
- }
- }
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- }
- }
-
- if (total < min_number) {
- min_str = total + min_unit;
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return max_str + min_str;
- },
- getOutCountSeven(warehouse_info_id,max_unit,min_unit,min_number,drug_id){
- var arr = []
- var total = 0
- var max_str = ""
- var min_str = ""
- for(let j=0;j<this.outList.length;j++){
- if(this.outList[j].count_unit == max_unit){
- this.outList[j].count = this.outList[j].count * min_number
- }
- if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
- arr.push(this.outList[j])
- }
- }
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
-
- total +=arr[i].count
- }
- }
- if (total < min_number) {
- min_str = total + min_unit;
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return max_str + min_str;
- },
- getOutCount(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var total = 0
- var max_str = ""
- var min_str = ""
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
-
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- }
- }
-
- if (total < min_number) {
- min_str = total + min_unit;
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return max_str + min_str;
- },
- getOutCountOne(batch_number,max_unit,min_unit,min_number,drug_id){
-
- var arr = []
- var total = 0
- var max_str = ""
- var min_str = ""
-
- for(let j=0;j<this.tabList.length;j++){
-
- if(batch_number == this.tabList[j].batch_number && drug_id == this.tabList[j].drug_id){
- arr.push(this.tabList[j])
- }
- }
-
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- }
- }
-
- if (total < min_number) {
- min_str = total + min_unit;
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return max_str + min_str;
- },
- getBatchNumber(warehouse_info_id){
- var arr = []
- var batch_number = 0
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length > 0){
- batch_number = arr[0].batch_number
- }
- return batch_number
- },
- getBatchNumberOne(number){
- var arr = []
- var batch_number = 0
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].batch_number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length > 0){
- batch_number = arr[0].batch_number
- }
- return batch_number
- },
- getPrice(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var price = 0
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
-
- if(arr.length > 0){
- price = arr[0].price
- }
- return price
- },
- getPriceOne(number,max_unit,min_unit,min_number){
- var arr = []
- var price = 0
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].batch_number){
- arr.push(this.tabList[j])
- }
- }
-
- if(arr.length > 0){
- price = arr[0].price
- }
- return price
- },
- getTotalPrice(warehouse_info_id,max_unit,min_unit,min_number){
-
- var arr = []
- var total = 0
- var max_str = 0
- var min_str = 0
- var price = 0
- var all_price = 0
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
-
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- price = arr[0].price
- }
- }
-
- if (total < min_number) {
- min_str = total
- }
- if (total == 0) {
- min_str = 0;
- max_str = 0;
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number)
- }
- if (total % min_number != 0) {
- min_str = (total % min_number)
- }
- }
- if(max_unit!=min_unit){
- all_price = max_str * min_number * price + min_str * price
- }
- if(max_unit == min_unit){
- all_price = max_str * price + min_str * price
- }
-
- if(all_price > 0){
- return all_price.toFixed(2)
- }else{
- return 0
- }
- },
- getTotalPriceOne(number,max_unit,min_unit,min_number,retail_price){
-
- var arr = []
- var total = 0
- var max_str = 0
- var min_str = 0
- var price = 0
- var all_price = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].batch_number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- }
- }
- price = retail_price
- if (total < min_number) {
- min_str = total
- }
- if (total == 0) {
- min_str = 0;
- max_str = 0;
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number)
- }
- if (total % min_number != 0) {
- min_str = (total % min_number)
- }
- }
-
-
- if(max_unit!=min_unit){
- all_price = max_str * price + min_str * price
- }
- if(max_unit == min_unit){
- all_price = max_str * price + min_str * price
- }
- if(all_price > 0){
- return all_price.toFixed(2)
- }else{
- return 0
- }
- },
- getAllManufacturerName(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var manufacture_id = 0
- var manufacturer_name = ""
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- manufacture_id = arr[0].manufacturer
- }
- manufacturer_name = this.getManufacturerName(manufacture_id)
- return manufacturer_name
- },
- getAllManufacturerNameOne(number,max_unit,min_unit,min_number){
- var arr = []
- var manufacture_id = 0
- var manufacturer_name = ""
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- manufacture_id = arr[0].manufacturer
- }
- manufacturer_name = this.getManufacturerName(manufacture_id)
- return manufacturer_name
- },
- getProductDate(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var product_date = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- product_date = arr[0].product_date
- }
- return this.getTime(product_date)
- },
- getProductDateOne(number,max_unit,min_unit,min_number){
- var arr = []
- var product_date = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- product_date = arr[0].product_date
- }
- return this.getTime(product_date)
- },
- getExpiryDate(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var expiry_date = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- expiry_date = arr[0].expire_date
- }
- return this.getTime(expiry_date)
- },
- getExpiryDateOne(number,max_unit,min_unit,min_number){
- var arr = []
- var expiry_date = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- expiry_date = arr[0].expire_date
- }
- return this.getTime(expiry_date)
- },
- getDealer(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var dealer = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- dealer = arr[0].dealer
- }
- return this.getDealerName(dealer)
- },
- getDealerOne(number,max_unit,min_unit,min_number){
- var arr = []
- var dealer = 0
-
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- dealer = arr[0].dealer
- }
- return this.getDealerName(dealer)
- },
- getNumber(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var number = ""
-
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- number = arr[0].number
- }
- return number
- },
- getNumberOne(number,max_unit,min_unit,min_number){
- var arr = []
- var number = ""
-
- for(let j=0;j<this.tabList.length;j++){
- if(number == this.tabList[j].number){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- number = arr[0].number
- }
- return number
- },
- getRemark(warehouse_info_id,max_unit,min_unit,min_number){
- var arr = []
- var remark = ""
- for(let j=0;j<this.tabList.length;j++){
- if(warehouse_info_id == this.tabList[j].warehousing_detail_id){
- arr.push(this.tabList[j])
- }
- }
- if(arr.length >0){
- if(arr[0].DrugWarehouseInfoOne!=null){
- remark = arr[0].DrugWarehouseInfoOne.remark
- }
- }
- return remark
- },
- getAllOut(count,max_unit,min_unit,min_number){
-
- var total = 0
- var max_str = ""
- var min_str = ""
- total = count
- if (total < min_number) {
- min_str = total + min_unit
- }
- if (total == 0) {
- min_str = 0;
- max_str = 0;
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit
- }
- if (total % min_number != 0) {
- min_str = (total % min_number)+ min_unit
- }
- }
- return max_str + min_str
- },
- getPriceTwo(warehouse_out_id,drug_id){
- var price = 0
- for(let i=0;i<this.warehouseOutList.length;i++){
- if(drug_id == this.warehouseOutList[i].drug_id){
- price = this.warehouseOutList[i].price
- }
- }
- return price
- },
-
- getOutCountTen(total,max_unit,min_unit,min_number){
-
- var max_str = ""
- var min_str = ""
-
-
- if (total < min_number) {
- min_str = total + min_unit;
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return max_str + min_str;
- },
-
- getOutCountNightTen(warehouse_info_id,max_unit,min_unit,min_number,drug_id){
- var arr = []
- var total = 0
- var max_str = ""
- var min_str = ""
-
- for(let j=0;j<this.outList.length;j++){
- if(warehouse_info_id == this.outList[j].warehouse_info_id && drug_id == this.outList[j].drug_id){
- arr.push(this.outList[j])
- }
- }
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- }
- }
-
- if (total < min_number) {
- min_str = total
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number)
- }
- if (total % min_number != 0) {
- min_str = (total % min_number)
- }
- }
- return max_str + min_str;
- },
-
- getOutCountNightTenOne(batch_number,max_unit,min_unit,min_number,drug_id){
-
- var arr = []
- var total = 0
- var max_str = ""
- var min_str = ""
-
- for(let j=0;j<this.tabList.length;j++){
-
- if(batch_number == this.tabList[j].batch_number && drug_id == this.tabList[j].drug_id){
- arr.push(this.tabList[j])
- }
- }
-
- if(arr.length > 0){
- for(let i=0;i<arr.length;i++){
- total +=arr[i].count
- }
- }
-
- if (total < min_number) {
- min_str = total
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number)
- }
- if (total % min_number != 0) {
- min_str = (total % min_number)
- }
- }
- return max_str + min_str;
- },
- },
- };
- </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>
|