commodity-detail.vue
3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<style>
.btn-d-cancel{border:1px #cfd4d7 solid;background:#cfd4d7;color:#fff;}
</style>
<template>
<div class="container resource close-left-menu" style="min-height: 490px;">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a class="fbtn fb-return" v-on:click="go">返回</a>
</div>
<h3 class="current-module">商品清单</h3>
</div>
<!--purchase-plan start-->
<div class="purchase-plan">
<div class="min-search min-search-green " style="display: inline-block;border-right:0px;">
<input class="min-search-txt w600" id="cn1" v-model="search.name"
style="border-right:0px; height: 27px;" placeholder="请输入商品名称、规格、厂商、注册证号、追溯条码过滤">
<button class="min-search-btn" v-on:click="getData()"
style="margin-left:-24px;"></button>
</div>
<div class="search-result mt-20">
<div class="statistics">您当前共有<em>{{num}}</em>个商品</div>
</div>
<div class="ctable ct-parent mt-20">
<div class="ct-head">
<span class="ct-col w50">序号</span>
<span class="ct-col w80">商品编号</span>
<span class="ct-col w130">商品名称</span>
<span class="ct-col w130">生产厂商</span>
<span class="ct-col w200">注册证号/批准文号</span>
<span class="ct-col w80">生产来源</span>、
<span class="ct-col w80">医疗机构</span>
<span class="ct-col w80">供应企业</span>
<span class="ct-col w150">操作</span>
</div>
<div class="ct-row " :class="{'active focus ':item.show}"
v-for="item in list">
<div class="row-line">
<span class="ct-col w50">{{$index+1}}</span>
<span class="ct-col w80">{{item.GoodsCode}}</span>
<span class="ct-col w130 break-it t-left">
<div class="p-lr-10 break">
{{item.GoodsName}}
<!-- <br>{{item.hnum}} -->
</div></span>
<span class="ct-col w130 break-it">{{item.Producer}}</span>
<span class="ct-col w200">{{item.RegistKey}}</span>
<span class="ct-col w80">国产</span>
<span class="ct-col w80 focus"
:class="{'activate':item.show}"><div>
<!-- <a href="javascript:" v-on:click="setshow(item)"></a> -->
{{item.hnum}}
</div>
</span>
<span class="ct-col w80"><div>{{item.hnum}}</div></span>
<span class="ct-col w150"><div>
<a class="btn-d btn-d-activate" v-link="{path:'/hospitalDetailGoods2/'+item.GUID}">商品清单</a></div></span>
</div>
<boxpaged :id="item.GUID" :show.sync="item.show"
:count="item.GoodsName"></boxpaged>
</div>
</div>
<!-- <pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination> -->
</div>
<!--purchase-plan end-->
</div>
</template>
<script>
module.exports={
data:function(){
return {
list:[
],search:{
pagesize: 10, page: 1, totalPages: 0,searchWord:'',name:''
},num:0
}
},methods:{
go:function(){
history.go(-1)
},
setshow:function(item){
if(item.show==undefined || item.show==false){
item.show=true;
}else{
item.show=false;
}
},
getData:function(casetxt){//请求数据
Ajax.post('/api/getMedGoodsList',
this.search).then(function(res){
var result=res.data;
if(result.data){
var list=result.data;
for(var i=0;i<list.length;i++){
list[i].show=false;
}
this.num=list.length;
this.$set('list',list);
//this.search.totalPages=result.data.totalPages
}
}.bind(this))
}
},route:{
activate:function(){
this.getData();
}
}
}
</script>