123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <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].type.type_name}} </span>
- <span style="width: 300px;color: #606266">规格名称: {{userList[0].info.specification_name}}</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 v-if="scope.row.is_total == 0">{{scope.row.count}}</span>
- <span v-if="scope.row.is_total == 1">{{scope.row.total}} </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} {h}:{i}')}} </span>
-
- </template>
- </el-table-column>
-
- </el-table>
- </el-row>
- </div>
- </div>
- </template>
-
- <script>
- import { uParseTime } from '@/utils/tools'
- import { getWarehouseOutUser } from '@/api/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: {
- 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
- },
- GetOrderDetail: function(order_id) {
- const params = {
- 'id': order_id
- }
- getWarehouseOutUser(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- var total = 0
-
- var list = response.data.data.list
- console.log("list",list)
- var arrList = this.unique(list)
- for (let i = 0; i < arrList.length; i++) {
- var obj = arrList[i]
- obj['is_total'] = 0
- this.userList.push(obj)
- total = total + arrList[i].count
- }
- this.userList.push({
- is_total: 1,
- total: total,
- })
- }
- })
- },
-
- unique(arr) {
- const res = new Map();
- return arr.filter((arr) => !res.has(arr.patient_id) && res.set(arr.patient_id, 1));
- }
- }
- }
- </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>
|