dataadmin-productN.vue
6.51 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<template>
<div class="container resource close-left-menu" style="min-height: 447px;">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a v-link="{path:'/dataadminProductDetailN'}" href="javascript:" class="fbtn fb-add">新增</a>
<a v-link="{path:'/exportProduct'}" href="javascript:;" class="fbtn fb-download" @click="">批量导入</a>
</div>
<h3 class="current-module">产品主数据维护</h3>
</div>
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group">
<label for="cn15" class="label">产品名称</label>
<div class="control">
<input type="text" value="" id="cn16" v-model='search.productname' placeholder="产品名称"></div>
</div>
<div class="form-group">
<label for="cn11" class="label">注册证号/批准文号</label>
<div class="control">
<input type="text" value="" id="cn11" v-model='search.registkey ' placeholder=注册证号></div>
</div>
</div>
<div class="group-row">
<div class="form-group">
<label for="cn12" class="label">生产厂商</label>
<div class="control">
<input type="text" value="" id="cn12" v-model='search.producer' placeholder="生产厂商"></div>
</div>
<div class="form-group">
<label for="cn3" class="label">状态</label>
<div class="control control-filtering control-filtering-green">
<a :class="{'active all':search.state==''}" href="javascript:;" @click="search.state=''"
class="option">所有</a>
<a :class="{'active all':search.state=='Y'}" href="javascript:;" @click="search.state='Y'"
class="option">有效</a>
<a :class="{'active all':search.state=='S'}" href="javascript:;" @click="search.state='S'"
class="option">停用</a>
<a :class="{'active all':search.state=='E'}" href="javascript:;" @click="search.state='E'"
class="option">废弃</a>
</div>
</div>
</div>
<div class="group-row t-right">
<button class="fast-search-form-btn btn-d btn-d-lg btn-d-activate btn-d-circle" @click="getData(true)">查 询
</button>
</div>
</div>
<div class="fheader no-bottom ">
<h4 class="no-l-icon">产品资料</h4>
</div>
<table class="itable itable-thead-13px itable-bordertop itable-td-long-text">
<thead>
<tr>
<th class="w50">序号</th>
<th class="w160">产品名称</th>
<th class="w200">生产厂商</th>
<th class="w80">药品本位码</th>
<th class="w200">规格型号</th>
<th class="w100">注册证号/批准文号</th>
<th class="w100">商品大类</th>
<th class="w50">状态</th>
<th class="w100">操作</th>
</tr>
</thead>
<tbody>
<tr v-if="productList.length==0">
<td colspan="10" >
暂无符合条件的记录
</td>
</tr>
<tr v-else v-for="goods in productList">
<td>{{$index + 1}}</td>
<td class="t-left pr10 pl10">{{goods.productname}}</td>
<td class="t-left pr10">{{goods.producer}}</td>
<td>{{goods.productstandardcode}}</td>
<td>{{goods.productspec}}</td>
<td>{{goods.registkey}}</td>
<td>{{goods.goodscate|GOODSCATE}}</td>
<td>{{goods.state|BIZSTATE}}</td>
<td>
<div>
<a v-link="{path: '/dataadminProductDetailN/' + goods.guid}" href="javascript:;"
class="btn-d btn-d-activate ml-10 text-color-custom">明细</a>
</div>
</td>
</tr>
</tbody>
</table>
<pagination-n
@page-change="getData"
:classs="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination-n>
</div>
</template>
<script>
module.exports = {
data: function () {
return {
state: [{
value: "Y",
label: "启用"
}, {
value: "S",
label: "停用"
}, {
value: "E",
label: "作废"
}],
productList: [],
search: {
pageSize: 50,
page: 1,
totalPages: 0,
productname: '',
producer: '',
registkey: '',
state: '',
},
}
},
methods: {
getData: function (val) {
var self = this;
if(val){
self.search.page=1;
}
Ajax.post('/dataadmin/getmfmproductions', self.search).then(function (response) {
var data = response.data.data;
if (response.data.errorCode == 0) {
console.log(response.data.errorCode)
self.$set('productList', data.list);
self.search.totalPages = data.totalPages;
self.search.pageNo = data.pageNo;
}
})
},
},
watch:{
'search.state':function () {
this.getData();
}
},
route: {
activate: function () {
this.search= {
pageSize: 50,
page: 1,
totalPages: 0,
productname: '',
producer: '',
registkey: '',
state: '',
},
this.getData();
}
}
};
</script>