123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659 |
- <template>
- <div class="main-contain">
- <div class="position">
- <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- <el-button
- size="small"
- @click="handleWarehouse"
- 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 list"
- :key="index"
- :label="option.storehouse_name"
- :value="option.id">
- </el-option>
- </el-select>
- <el-input
- size="small"
- style="width: 200px;"
- v-model.trim="searchKey"
- class="filter-item"
- 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>
-
-
-
- <div class="cell clearfix">
- <el-checkbox
- style="width: 70px"
- v-model="checkAllStatus"
- @change="changeCheck"
- >全选</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">导出</el-button>
- </div>
-
- <el-table
- ref="multipleTable"
- :data="Warehouse.warehouseDate"
- :class="signAndWeighBoxPatients"
- style="width: 100%"
- border
- highlight-current-row
- v-loading="Warehouse.loading"
- @selection-change="select"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- @current-change="handleSearch"
- >
- <el-table-column align="center" type="selection" width="55">
- </el-table-column>
-
- <el-table-column label="单据日期" align="center">
- <template slot-scope="scope">
- {{ scope.row.warehousing_time | parseTime("{y}-{m}-{d}") }}
- </template>
- </el-table-column>
-
- <el-table-column label="单据编号" align="center">
- <template slot-scope="scope">
- {{ scope.row.warehousing_order }}
- </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 == 12">调拨入库</span>
- <span v-if="scope.row.is_sys == 0">手动入库</span>
- </template>
- </el-table-column>
-
- <el-table-column label="操作" align="center" width="260px">
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="dark"
- content="编辑"
- placement="top"
- >
- <el-button
- size="small"
- 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="small"
- type="danger"
- 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
- v-loading="Warehouse.loading"
- @selection-change="select"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- fit
- >
- <el-table-column label="耗材名称" align="center">
- <template slot-scope="scope">
- {{ scope.row.GoodInfo.good_name }}
- </template>
- </el-table-column>
- <el-table-column label="耗材类型" align="center">
- <template slot-scope="scope">
- {{ getTypeName(scope.row.GoodInfo.good_type_id)}}
- </template>
- </el-table-column>
- <el-table-column label="规格&单位" align="center">
- <template slot-scope="scope">
- {{ scope.row.GoodInfo.specification_name}} / {{scope.row.GoodInfo.packing_unit}}
- </template>
- </el-table-column>
- <el-table-column label="国家编码" align="center">
- <template slot-scope="scope">
- {{ scope.row.GoodInfo.social_security_directory_code}}
- </template>
- </el-table-column>
- <el-table-column label="批号" align="center">
- <template slot-scope="scope">
- {{ scope.row.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">
- {{ scope.row.warehousing_count}}{{scope.row.GoodInfo.packing_unit}}
- </template>
- </el-table-column>
- <!-- <el-table-column label="零售价" align="center">
- <template slot-scope="scope">
- {{ scope.row.packing_price}}
- </template>
- </el-table-column> -->
- <el-table-column label="进货价" align="center">
- <template slot-scope="scope">
- {{ scope.row.price}}
- </template>
- </el-table-column>
- <el-table-column label="总价" align="center">
- <template slot-scope="scope">
- {{ (scope.row.warehousing_count * scope.row.price).toFixed(2)}}
- </template>
- </el-table-column>
- <el-table-column label="生产厂家" align="center">
- <template slot-scope="scope">
- {{ getManufactuerName(scope.row.manufacturer)}}
- </template>
- </el-table-column>
- <el-table-column label="生产日期" align="center">
- <template slot-scope="scope">
- {{ getTime(scope.row.product_date,"{y}-{m}-{d}")}}
- </template>
- </el-table-column>
- <el-table-column label="有效期" align="center">
- <template slot-scope="scope">
- {{ getTime(scope.row.expiry_date,"{y}-{m}-{d}")}}
- </template>
- </el-table-column>
- <el-table-column label="经销商" align="center">
- <template slot-scope="scope">
- {{ getDealerName(scope.row.dealer)}}
- </template>
- </el-table-column>
- <el-table-column label="批准文号" align="center">
- <template slot-scope="scope">
- {{ scope.row.license_number}}
- </template>
- </el-table-column>
- <el-table-column label="备注" align="center">
- <template slot-scope="scope">
- {{ scope.row.remark }}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
-
-
-
-
-
- <el-dialog
- title="详情"
- :visible.sync="dialogVisible"
- width="80%"
- >
- <span>
- <div>
- <el-row>
- <span style="font-size: 18px;color: #606266">入库单详情</span>
- </el-row>
- <el-row style="float:left;">
- <span style="color: #606266"
- >入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span
- >
- </el-row>
- </div>
- <div class="cell clearfix">
- <span style="width: 300px;color: #606266;float:right">单据日期:{{ WarehouseInfo.warehouse.warehousing_time | parseTime("{y}-{m}-{d}")}} </span>
- <span style="width: 300px;color: #606266;float:right">厂商:{{ getManufactuerName(WarehouseInfo.warehouse.manufacturer) }}</span>
- <span style="width: 300px;color: #606266"
- >经销商:{{ getDealerName(WarehouseInfo.warehouse.dealer) }} </span>
- </div>
- <div class="cell clearfix" style="margin-top: 10px">
- <el-button size="small" icon="el-icon-edit" @click="editRecord"
- >编辑</el-button
- >
- <el-button size="small" icon="el-icon-delete" @click="deleteRecord"
- >删除</el-button
- >
-
- <el-row :gutter="12" style="margin-top: 10px">
- <el-table
- :data="WarehouseInfo.warehouseInfoDate"
- :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>{{ scope.row.warehousing_count }}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="总价" min-width="20" align="center">
- <template slot-scope="scope">
- {{ calculate(scope.row.price * scope.row.warehousing_count) }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" min-width="25">
- <template slot="header" slot-scope="scope">
- <span>批号</span>
- </template>
- <template slot-scope="scope">
- <span>{{ scope.row.number }}</span>
- </template>
- </el-table-column>
- <el-table-column label="生产日期" min-width="40" align="center">
- <template v-if="scope.row.product_date != 0" slot-scope="scope">
- {{ scope.row.product_date }}
- </template>
- </el-table-column>
- <el-table-column label="有效日期" min-width="40" align="center">
- <template v-if="scope.row.expiry_date != 0" slot-scope="scope">
- {{ scope.row.expiry_date }}
- </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>
- </el-row>
- </div>
-
- </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="editDialogVisible"
- width="80%"
- >
- <span>
-
- <div style="margin-bottom:10px">
- <label class="title"><span class="name">入库时间</span> : </label>
- <el-date-picker size="small" v-model="warehousing_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
- id="oictable"
- :data="recordInfo.recordData"
- :class="signAndWeighBoxPatients"
- style="width: 100%"
- border
- max-height="450"
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
- >
- <el-table-column align="center" width="200">
- <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 align="center" width="200">
- <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 align="center" width="150">
- <template slot="header" slot-scope="scope">
- <span>单价<span style="color: red">*</span></span>
- </template>
- <template slot-scope="scope">
- <!--<el-input type="number" v-model="scope.row.price" @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
- <el-form-item
- :prop="'recordData.' + scope.$index + '.price'"
- :rules="tableRules.price"
- style="padding-top: 17px"
- >
- <el-input
- placeholder="请输入单价"
- type="number"
- v-model="scope.row.price"
- ></el-input>
- </el-form-item>
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="180">
- <template slot="header" slot-scope="scope">
- <span>入库数量<span style="color: red">*</span></span>
- </template>
- <template slot-scope="scope">
- <!--{{scope.row.warehousing_count}}-->
- <!--<el-input type="number" v-model="scope.row.warehousing_count" @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
-
- <el-form-item
- :prop="'recordData.' + scope.$index + '.warehousing_count'"
- :rules="tableRules.warehousing_count"
- style="padding-top: 17px"
- >
- <el-input
- placeholder="请输入入库数量"
- type="number"
- v-model="scope.row.warehousing_count"
- ></el-input>
- </el-form-item>
- </template>
- </el-table-column>
- <el-table-column label="总价" align="center" width="150">
- <template slot-scope="scope">
- {{ calculate(scope.row.price * scope.row.warehousing_count) }}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="150">
- <template slot="header" slot-scope="scope">
- <span>批号</span>
- </template>
- <template slot-scope="scope">
- <el-form-item style="padding-top: 15px">
- <el-input
- placeholder="请输入批号"
- v-model="scope.row.number"
- ></el-input>
- </el-form-item>
- </template>
- </el-table-column>
-
- <el-table-column label="生产日期" width="250" align="center">
- <template slot-scope="scope">
-
- <el-date-picker
- prefix-icon="el-icon-date"
- style="width: 145px"
- v-model="scope.row.product_date"
- type="date"
- placeholder="选择日期时间"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- </template>
- </el-table-column>
- <el-table-column label="有效日期" width="250" align="center">
- <template slot-scope="scope">
-
- <el-date-picker
- prefix-icon="el-icon-date"
- style="width: 145px"
- v-model="scope.row.expiry_date"
- type="date"
- placeholder="选择日期时间"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- ></el-date-picker>
- </template>
- </el-table-column>
-
- <el-table-column label="备注" width="150" align="center">
- <template slot-scope="scope">
- <el-input v-model="scope.row.remark"></el-input>
- </template>
- </el-table-column>
-
- <el-table-column
- label="操作"
- fixed="right"
- align="center"
- width="150"
- >
- <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="handleEditTwo(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="DeleteWarehouseInfoItem(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>
-
-
- <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 stockInDialog from "./Dialog/stockInDialog";
- import { uParseTime } from "@/utils/tools";
- import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
- import {
- deleteWarehouseInfo,
- GetAllConfig,
- GetAllGoodInfo,
- GetAllGoodType,
- getWarehouseInfoList,
- getWarehouseList,
- DeleteWarehouseInfoItem,
- GetAllGoodInfoByID,
- EditWarehouse,
- getExportStockList
- } from "@/api/stock";
-
- import { GetAllDrugInfoByID,postDrugWarehouse} from "@/api/drug/drug_stock";
- import BreadCrumb from "../components/bread-crumb";
-
- export default {
- name: "stockIn",
- components: { BreadCrumb, stockInDialog },
- 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.GetWarehouse();
- this.GetConfigInfo();
- this.fetchAllAdminUsers();
- this.GetAllGoodType()
- this.GetAllGoodInfo()
-
-
- },
- data() {
-
- var checkGoodId = (rule, value, callback) => {
- setTimeout(() => {
- if (value == "" || value == 0) {
- return callback(new Error("规格名称不能为空"));
- }
- }, 2000);
- };
- return {
- crumbs: [
- { path: false, name: "库存管理" },
- { path: false, name: "入库单" }
- ],
- searchKey: "",
- type: 1,
- page: 1,
- limit: 5,
- checked: false,
- total: 0,
- pageTotal: 0,
- pageSelect: 0,
- adminUserOptions: [],
- multipleSelection: [],
- signAndWeighBoxPatients: "sign-and-weigh-box-patients",
- start_time: "",
- end_time: "",
- goodType: [],
- goodInfo: [],
- manufacturer: [],
- selectedTableData: [],
- dealer: [],
- Warehouse: {
- loading: false,
- warehouseDate: [],
- tableCurrentIndex: ""
- },
-
- WarehouseInfo: {
- loading: false,
- warehouseInfoDate: [],
- warehouse: {}
- },
- startTime: "",
- dialogVisible:false,
- editDialogVisible:false,
-
- recordInfo: {
- recordData: [],
- stock_in_code: "",
- current_index: ""
- },
-
- tableRules: {
- price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
- warehousing_count: [
- { required: true, message: "数量不能为空", trigge: "blur" }
- ],
-
- good_id: [{ validator: checkGoodId, trigger: "blur" }]
- },
-
- form: {
- manufacturer:0,
- dealer:0
- },
- warehousing_time: '',
- warehouse:{},
- propForm: {
- goods: [],
- goodType: [],
- goodInfo: [],
- goodUnit: [],
- title: '入库',
- formValue: {
- good_type_id: '',
- good_id: '',
- number: '',
- product_date: '',
- expiry_date: '',
- warehousing_count: '',
- price: '',
- remark: '',
- dealer: '',
- manufacturer: ''
- },
- isCreated: 1,
- isVisibility: false,
- drug_id:1,
- },
- drug_id:1,
- tableShow:false,
- tableList:[],
- isVisibility:false,
- order_id:0,
- exportList:[],
- checkAllStatus:false,
- list:[],
- storehouse_id:0,
- };
-
-
- },
- methods: {
- changeCheck() {
- this.$refs.multipleTable.clearSelection();
- if (this.checkAllStatus) {
- this.$refs.multipleTable.toggleAllSelection();
- }
- },
- 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,
- };
- this.Warehouse.warehouseDate = [];
- getWarehouseList(Params).then(response => {
- if (response.data.state == 0) {
- this.Warehouse.loading = false;
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.Warehouse.loading = false;
- this.total = response.data.data.total;
- for (let i = 0; i < response.data.data.list.length; i++) {
- this.Warehouse.warehouseDate.push(response.data.data.list[i]);
- }
-
- }
- });
- },
- GetWarehouse: 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,
- };
-
- this.Warehouse.warehouseDate = [];
- getWarehouseList(Params).then(response => {
- if (response.data.state == 0) {
- this.Warehouse.loading = false;
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.Warehouse.loading = false;
- this.total = response.data.data.total;
- for (let i = 0; i < response.data.data.list.length; i++) {
- this.Warehouse.warehouseDate.push(response.data.data.list[i]);
- }
- this.list = []
- var obj = {id:0,storehouse_name:"全部"}
- this.list.push(obj)
- for(let i=0;i<response.data.data.houselist.length;i++){
- this.list.push(response.data.data.houselist[i])
- }
-
- }
- });
- },
- tableRowClassName({ row, rowIndex }) {
- // 把每一行的索引放进row
- row.index = rowIndex;
- },
- onRowClick(row, event, column) {
- this.WarehouseInfo.warehouseInfoDate = [];
- this.Warehouse.tableCurrentIndex = row.index;
- const params = {
- id: row.id
- };
- this.WarehouseInfo.loading = true;
- getWarehouseInfoList(params).then(response => {
- if (response.data.state == 0) {
- this.WarehouseInfo.loading = false;
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.WarehouseInfo.loading = false;
- for (let i = 0; i < response.data.data.info.length; i++) {
- this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[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;
- },
- fetchAllDoctorAndNurse() {
- fetchAllDoctorAndNurse().then(response => {
- if (response.data.state == 1) {
- this.doctorOptions = response.data.data.doctors;
- }
- });
- },
- 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]);
- }
- }
- }
- });
- },
- 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;
- },
- 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;
- },
- GetAllGoodType: function() {
- GetAllGoodType().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
-
- for (let i = 0; i < response.data.data.goodType.length; i++) {
- this.goodType.push(response.data.data.goodType[i]);
- }
- }
- });
- },
- GetAllGoodInfo: function() {
- GetAllGoodInfo().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
-
- for (let i = 0; i < response.data.data.goodInfo.length; i++) {
-
- this.goodInfo.push(response.data.data.goodInfo[i]);
- }
- }
- });
- },
- clicks: function() {
-
- },
- handleWarehouse: function() {
- this.$router.push({ path: "/stock/in/add", query: { type: this.type } });
- },
- handleReturnSales: function() {
- // this.$router.push({path:'/patients/create'}
- if (this.multipleSelection.length <= 0) {
- this.$message.error("请选择退货商品");
- return;
- }
-
- const ids = [];
- for (let i = 0; i < this.multipleSelection.length; i++) {
- ids.push(this.multipleSelection[i].id);
- }
- this.$router.push({ name: "salesReturn", query: { id: ids.join("&") } });
- },
- handleReturnSalesRecord: function() {
- this.$router.push({ name: "salesReutrnRecord" });
- },
- handleWarehouseRecord: function() {
- this.$router.push({ name: "warehouseRecord" });
- },
- handleSelectionChange: function(val) {
- this.multipleSelection = val;
- },
- handleSizeChange(val) {
- this.limit = val;
- this.GetWarehouse();
- },
- handleCurrentChange(val) {
- this.page = val;
- this.GetWarehouse();
- },
- startTimeChange(val) {
- var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
- if (time > 0) {
- this.$message.error("结束时间不能小于开始时间");
- this.start_time = "";
- } else {
- this.startTime = this.getTimestamp(val);
- this.GetWarehouse();
- 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.GetWarehouse();
- this.getlist()
- }
- },
- getTimestamp(time) {
- // 把时间日期转成时间戳
- return new Date(time).getTime() / 1000;
- },
- getTime(val, temp) {
- if (val != 0) {
- return uParseTime(val, temp);
- } else {
- return "";
- }
- },
- 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.list = response.data.data.list
- 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/in/order/edit?id="+row.id+"&supply_warehouse_id="+row.supply_warehouse_id+"&is_sys="+row.is_sys})
- },
- handleDelete: function(index, row) {
- if(row.is_sys== 12){
- this.$message.error("调拨入库数据不能删除!")
- return false
- }
- if(row.supply_warehouse_id > 0){
- 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(() => {
- deleteWarehouseInfo(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.Warehouse.warehouseDate.length; y++) {
- if (ids[i] == this.Warehouse.warehouseDate[y].id) {
- this.Warehouse.warehouseDate.splice(y, 1);
- }
- }
- }
- }
- });
- })
- .catch(() => {});
- },
-
- select(selection) {
- var ids= []
- for(let i=0;i<selection.length;i++){
- ids.push(selection[i].id)
- }
- this.exportList = []
- var str = ids.join(",")
- this.order_id = str
- 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_sys ==12){
- this.$message.error("调拨入库数据不能删除!")
- return false
- }
- ids.push(this.selectedTableData[i].id);
- idOne.push(this.selectedTableData[i].supply_warehouse_id)
- }
- for(let i=0;i<idOne.length;i++){
- if(idOne[i] >0){
- this.$message.error("采购入库数据不能删除!")
- return false
- }
- }
-
- const idStr = ids.join(",");
- const params = {
- ids: idStr
- };
- this.$confirm("确认删除入库单记录?", "删除入库单记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- deleteWarehouseInfo(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.Warehouse.warehouseDate.length; y++) {
- if (ids[i] == this.Warehouse.warehouseDate[y].id) {
- this.Warehouse.warehouseDate.splice(y, 1);
- }
- }
- }
- }
- });
- })
- .catch(() => {});
- },
-
- // handleSearch(id){
- // this.WarehouseInfo.warehouseInfoDate = [];
- // this.GetOrderDetail(id)
- // this.drug_id = id
- // this.dialogVisible = true
- // },
-
- handleSearch(val){
- this.tableList= []
- this.GetOrderDetail(val.id)
- this.drug_id = val.id
-
- },
-
- GetOrderDetail: function(id) {
- const params = {
- id: id
- };
- getWarehouseInfoList(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.tableShow = true
- for (let i = 0; i < response.data.data.info.length; i++) {
- this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
- response.data.data.info[i].price = response.data.data.info[i].price.toString();
- response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
-
- this.recordInfo.recordData.push(response.data.data.info[i]);
- this.tableList.push(response.data.data.info[i])
- }
- this.warehouse = response.data.data.warehousing;
- this.warehousing_time = this.getTime(this.warehouse.warehousing_time,"{y}-{m}-{d}");
-
- this.WarehouseInfo.warehouse = response.data.data.warehousing;
-
- }
- });
- },
-
- editRecord: function() {
-
-
- this.editDialogVisible = true
- },
-
- deleteRecord: function() {
- const ids = [];
- ids.push(this.WarehouseInfo.warehouse.id);
- const idStr = ids.join(",");
-
- const params = {
- ids: idStr
- };
-
- this.$confirm("确认删除入库单记录?", "删除入库单记录", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- deleteWarehouseInfo(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(() => {});
- },
-
- 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;
- },
-
- showDialog(index, row) {
- this.currentIndex = index;
- 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);
- }
- });
- },
-
- specificationName: function(drug_id) {
-
- let name = "";
- for (let i = 0; i < this.goodInfo.length; i++) {
- if (this.goodInfo[i].id == drug_id) {
- name = this.goodInfo[i].specification_name;
- }
- }
- return name;
- },
-
- 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 = {
- stockIn: this.recordInfo.recordData
- };
- EditWarehouse(
- params,
- this.warehousing_time,
- this.drug_id,
- this.type,
- 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.dialogVisible = false
- this.editDialogVisible = false
-
- }
- });
- } else {
- return false;
- }
- });
- },
-
- changeManufacturer(val) {
-
- },
- changeDealer(val) {
-
- },
-
- DeleteWarehouseInfoItem: 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(() => {
- DeleteWarehouseInfoItem(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(() => {});
- }
- },
- handleEditTwo: function(index, row) {
- const tempObj = {};
- tempObj["id"] = 0;
- tempObj["good_type_id"] = 0;
- tempObj["good_id"] = 0;
- tempObj["number"] = "";
- tempObj["product_date"] = "";
- tempObj["expiry_date"] = "";
- tempObj["warehousing_count"] = "";
- tempObj["price"] = "";
- tempObj["remark"] = "";
- tempObj["dealer"] = "";
- tempObj["manufacturer"] = "";
- this.recordInfo.recordData.push(tempObj);
- },
-
- 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["number"] = "";
- tempForm["product_date"] = "";
- tempForm["expiry_date"] = "";
- tempForm["warehousing_count"] = "";
- tempForm["price"] = val.selectedGoodInfo[i].buy_price.toString();
- tempForm["remark"] = "";
- tempForm["dealer"] = "";
- tempForm["manufacturer"] = "";
- this.recordInfo.recordData.splice(
- this.currentIndex + 1,
- 0,
- tempForm
- );
- }
- }
- }
-
- this.currentIndex = -1;
- },
- cancle: function() {
- this.$refs.dialog.hide();
- this.propForm.goods = [];
-
- this.propForm.goodType = [];
- },
- toPrint(){
- if(this.order_id == ""){
- this.$message.error("请勾选入库单")
- }else{
- this.$router.push("/stock/in/detail/print?id="+this.order_id)
- }
- },
- getlist(){
- var params = {
- id:this.order_id,
- start_time:this.start_time,
- end_time:this.end_time,
- storehouse_id:this.storehouse_id,
- }
-
- getExportStockList(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
-
- for(let i=0;i<this.goodType.length;i++){
- for(let j=0;j<list.length;j++){
- if(this.goodType[i].id == list[j].good_type_id){
- list[j].good_type_name = this.goodType[i].type_name
- }
- }
- }
- 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].warehousing_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
- }
- }
- }
- this.exportList = list
- }
- })
- },
- toExport(){
- if(this.order_id == ""){
- this.$message.error("请勾选入库单")
- return
- }
- import('@/vendor/Export2Excel').then(excel => {
- for(let i=0;i<this.exportList.length;i++){
- 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 = ""
- }
- }
-
- const tHeader = ['耗材名称','耗材类型', '规格&单位','批号','入库数量','进货价','总价','生产厂家','生产日期','有效期','经销商','批准文号','备注']
- const filterVal = ['good_name', 'good_type_id', 'unit','number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','license_number','remark']
-
-
-
- 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]));
- },
- getHouseName(id){
- var storehouse_name = ""
- for(let i=0;i<this.list.length;i++){
- if(id == this.list[i].id){
- storehouse_name = this.list[i].storehouse_name
- }
- }
- return storehouse_name
- },
- changeStoreHouse(){
- this.GetWarehouse();
- this.getlist()
- }
- }
- };
- </script>
-
- <style rel="stylesheet/css" lang="scss" scoped>
- .information {
- border: 1px #dcdfe6 solid;
- padding: 30px 20px 30px 20px;
-
- .border {
- border-bottom: 1px #dcdfe6 solid;
- margin: 0px 0 20px 0;
- }
- }
-
- .edit_separater {
- border-top: 1px solid rgb(233, 233, 233);
- margin-top: 15px;
- margin-bottom: 15px;
- }
- </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;
- }
- </style>
|