business-product.vue
5.55 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
<template>
<div class="container resource">
<div class="pop-banner clearfix">
<!-- <div class="operate-btns">
</div> -->
<h3 class="current-module">商品清单</h3>{{dual}}
</div>
<!--business-product start-->
<div class="business-product clearfix">
<div class="pd-form fast-search-form ">
<div class="group-row">
<div class="form-group">
<div class="control">
<input type="text" value="" id="cn1" v-model='search.search_LIKE_goodsname' placeholder="商品编码、名称、厂商、注册证号" title="商品编码、名称、厂商、注册证号"> </div>
</div>
<div class="form-group">
<label class="label primary-text" for="cn1" style="width:60px;">业务状态</label>
<div class="control control-filtering control-filtering-green" style="width:390px;">
<a class="{{ stateAll }}" href="javascript:void(0)" @click="bizState(null)">全部</a>
<a class="{{ stateYes }}" href="javascript:void(0)" @click="bizState(ctns.bizstatey)">有效</a>
<a class="{{ stateNo }}" href="javascript:void(0)" @click="bizState(ctns.bizstates)">停用</a>
<a class="{{ stateNY }}" href="javascript:void(0)" @click="bizState(ctns.bizstatee)">作废</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>
<!-- v-if="authoritySetting.oneSearchFlag" -->
</div>
</div>
<div class="search-result mb-0">
<div class="statistics">您当前共有
<em>{{search.total}}</em>个商品</div>
</div>
<table class=" itable itable-thead-13px itable-td-long-text">
<thead>
<tr>
<th class="w40">序号</th>
<th class="w70">商品
<br>编号</th>
<th class="w120">商品
<br>名称</th>
<th class="w120">供应商</th>
<th class="w60">规格</th>
<th class="w120">生产
<br>厂商</th>
<th class="w120">注册证号/
<br>批准文号</th>
<th class="w60">生产
<br>来源</th>
<th class="w60">业务
<br>状态</th>
<th class="w70">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="mfmedgoods in mfmedgoodsList ">
<td>{{$index + 1}}</td>
<td>{{mfmedgoods.goodscode}}</td>
<td>{{mfmedgoods.goodsname}}</td>
<td>{{mfmedgoods.supname}}</td>
<td>{{mfmedgoods.goodsspec}}</td>
<td>{{mfmedgoods.producer}}</td>
<td>{{mfmedgoods.registkey}}</td>
<td class="w80">{{ mfmedgoods.importedflag | IMPORTEDFLAG}}</td>
<td class="w80">{{ mfmedgoods.bizstate | BIZSTATE }}</td>
<td><a class="btn button-green mar-none" v-link="{ path:'/businessProductDetail/'+mfmedgoods.guid}" >明细</a></td>
<!-- v-if="authoritySetting.twoDetailFlag" -->
</tr>
</tbody>
</table>
<pagination
@page-change="getData(false)"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
</div>
<!--business-product end-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
mfmedgoodsList: [],
stateAll : 'all active',
stateNo : 'option',
stateYes : 'option',
stateNY : 'option',
search: {
pageSize: 10,
page: 1,
totalPages: 0,
total: 0,
search_LIKE_goodsname: '',
search_EQ_bizstate: '',
search_EQ_distrbguid: '',
},
};
},
methods: {
bizState: function(flag){
var self = this;
if(flag == null){
self.$set('stateAll',"all active option");
self.$set('stateNo',"option");
self.$set('stateYes',"option");
self.$set('stateNY',"option");
}else if(flag == self.ctns.bizstatey){
self.$set('stateAll',"option");
self.$set('stateNo',"option");
self.$set('stateYes',"all active option");
self.$set('stateNY',"option");
}else if(flag == self.ctns.bizstates){
self.$set('stateAll',"option");
self.$set('stateNo',"all active option");
self.$set('stateYes',"option");
self.$set('stateNY',"option");
}else if(flag == self.ctns.bizstatee){
self.$set('stateAll',"option");
self.$set('stateNY',"all active option");
self.$set('stateYes',"option");
self.$set('stateNo',"option");
}
self.$set('search.search_EQ_bizstate',flag);
self.getData();
},
getData: function(flg){
var self = this;
if (flg) {
self.search.page = 1;
}
Ajax.post('/business/listMfmedgoods', this.search)
.then(function (response){
var data = response.data;
if(data.errorCode == 0){
self.$set('mfmedgoodsList',data.data.list);
self.search.totalPages = data.data.totalPages;
self.search.total = data.data.total;
}else{
self.MessageBox({
title:'提示',message:data.message,type:'alert'
},function(action){})
}
})
},
},
route:{
activate : function(){
this.getData();
}
}
};
</script>