123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- <template>
- <div>
- <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom:10px;">
- <div>
- <!-- 耗材类别:
- <el-select v-model="value" size="small" placeholder="请选择">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- 停用状态:
- <el-select v-model="value" size="small" placeholder="请选择">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select> -->
- <el-input
- size="small"
- style="width: 200px;margin-left:10px;"
- 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>
- <!-- <div>
- <el-button size="small" type="primary" @click="print">打印</el-button>
- <el-button size="small" type="primary">导出</el-button>
- </div> -->
- </div>
- <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
- <el-table-column prop="date" label="药品名称" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.drug_name}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="规格" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="单位" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.warehousing_unit}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="库存数量" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.total}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="进价" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.last_price}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="零售价" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.retail_price}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="零售总价" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.count * scope.row.retail_price}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="产地" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.drug_origin_place}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="生产厂商" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.manufacturer}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="实盘点" width="100" align="center">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="亏损价格" width="100" align="center">
- <template slot-scope="scope">
-
- </template>
- </el-table-column>
- <el-table-column prop="name" label="生产日期" width="100" align="center">
- <template slot-scope="scope">
- {{getTime(scope.row.product_date)}}
- </template>
- </el-table-column>
- <el-table-column prop="name" label="有效日期" width="100" align="center">
- <template slot-scope="scope">
- {{getTime(scope.row.expiry_date)}}
- </template>
- </el-table-column>
- <!-- <el-table-column
- fixed="right"
- width="100"
- label="操作">
- <template slot-scope="scope">
- <el-button type="text" size="small">删除</el-button>
- <el-button type="text" size="small">编辑</el-button>
- </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>
- </template>
-
- <script>
- import { uParseTime } from '@/utils/tools'
- import { getInventoryDetailList } from "@/api/drug/drug"
- export default {
- name: "inventory",
- data() {
- return{
- searchKey:'',
- value1:'',
- value2:'',
- tableData: [],
- dialogVisible:false,
- form: {
- name: '',
- },
- total: 0,
- limit:10,
- page:1,
-
- }
- },
- methods:{
- search(){
-
- },
- print(){
- this.$router.push({path:'/stock/drugs/inventoryPrint'})
-
- },
- handleSizeChange(val){
- this.limit = val
- this.getlist()
- },
- handleCurrentChange(val){
- this.page = val
- this.getlist()
- },
- getlist(){
- var params = {
- limit:this.limit,
- page:this.page,
- keyword:this.searchKey,
- }
- console.log("parasm232332323",params)
- getInventoryDetailList(params).then(response=>{
- if(response.data.state == 1){
- this.total = response.data.data.total
- this.tableData = response.data.data.list
- console.log("比阿哥",this.tableData)
- this.doctorList = response.data.data.doctorList
- }
- })
- },
- getTime(val) {
- console.log("val3233232322323",val)
- if(val == undefined){
- return ""
- }
- if(val < 0){
- return ""
- }
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
-
- },
- created(){
- this.getlist()
- },
- mounted() {
- },
- };
- </script>
|