123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs='crumbs'></bread-crumb>
- </div>
-
- <div class="app-container">
-
- <div class="filter-container">
- <span style="font-size: 18px;color: #606266">商品使用明细</span>
- </div>
-
- <div class="cell clearfix">
- <span style="width: 300px;color: #606266">商品类型: {{userList[0].drug.drug_name}} </span>
- <span style="width: 300px;color: #606266">规格名称: {{userList[0].drug.drug_spec}}</span>
- </div>
-
- <el-row :gutter="12" style="margin-top: 10px">
- <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
- border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
- >
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>序号</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
- <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
- </template>
- </el-table-column>
-
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用人</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
- <span v-if="scope.row.is_total == 1"></span>
- </template>
- </el-table-column>
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用数量</span>
- </template>
- <template slot-scope="scope">
- <span >{{scope.row.count}}</span>
- </template>
- </el-table-column>
- <el-table-column min-width="35" align="center">
- <template slot="header" slot-scope="scope">
- <span>使用时间</span>
- </template>
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 0">{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
- <span v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
- </template>
- </el-table-column>
-
- </el-table>
- </el-row>
- </div>
- </div>
- </template>
-
- <script>
- import { uParseTime } from '@/utils/tools'
- import { getDrugWarehouseOutUser } from '@/api/drug/drug_stock'
- import BreadCrumb from '../../components/bread-crumb'
-
- export default {
- name: 'stockInOrderDetail',
- components: { BreadCrumb },
- created() {
- const order_id = this.$route.query.id
- this.GetOrderDetail(order_id)
- },
- data() {
- return {
- crumbs: [
- { path: false, name: '库存管理' },
- { path: false, name: '耗材出库单' },
- { path: false, name: '出库单详情' },
- { path: false, name: '使用明细' }
-
- ],
- signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
- userList:[]
- }
- },
- methods: {
- GetOrderDetail: function(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 {
- 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,
- })
-
- console.log(this.userList)
- }
- })
- }
- }
- }
- </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;
-
- }
-
- </style>
|