dataadmin-product.vue
6.14 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<template>
<div class="container resource" style="min-height: 447px;">
<div class="pop-banner clearfix">
<div class="operate-btns">{{dual}}
<a href="javascript:;" class="fbtn fb-add" v-link="{ path: '/dataAdminProductDetail/0/2'}" >添加</a>
</div>
<h3 class="current-module">产品资料维护</h3>
</div>
<div class="pd-form fast-search-form">
<div class="group-row group-row-3">
<div class="form-group">
<label for="cn1" class="label">产品名称</label>
<div class="control">
<input type="text" id="cn1" v-model='search.search_LIKE_productname'>
</div>
</div>
<div class="form-group">
<label for="cn1" class="label">生产厂商</label>
<div class="control">
<input type="text" id="cn1" v-model='search.search_LIKE_producer'>
</div>
</div>
<div class="form-group">
<label for="cn1" class="label">注册证号</label>
<div class="control">
<input type="text" id="cn1" v-model='search.search_LIKE_registkey'>
</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>
<table class="itable itable-thead-13px itable-bordertop itable-td-long-text">
<thead>
<tr>
<th class="w50">序号</th>
<th class="w100">主数据编码</th>
<th class="w120">产品名称</th>
<th class="w100">注册证号</th>
<th class="w140">生产厂家</th>
<th class="w120">产地</th>
<th class="w70">生产来源</th>
<th class="w70">商品大类</th>
<th class="w50">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="mfmproduction in listMfmproduction">
<td>{{$index + 1}}</td>
<td>{{mfmproduction.dataadminnNumber}}</td>
<td>
<div class="p-lr-10">{{mfmproduction.productname}}</div>
</td>
<td>
<div class="p-lr-10">{{mfmproduction.registkey}}</div>
</td>
<td>
<div class="p-lr-10">{{mfmproduction.producer}}</div>
</td>
<td>
<div class="p-lr-10">{{mfmproduction.productionaddress}}</div>
</td>
<td>
<div class="p-lr-10">{{mfmproduction.importedflag | IMPORTEDFLAG}}</div>
</td>
<td>
<div class="p-lr-10">{{mfmproduction.goodscate | GOODSCATE}}</div>
</td>
<td>
<a class="btn-d btn-d-activate" v-link="{ path: '/dataAdminProductDetail/' + mfmproduction.guid+'/'+mfmproduction.flag}" >明细</a>
</td>
</tr>
</tbody>
</table>
<pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
<!--end v-if="authoritySetting.twoDetailFlag"-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
listMfmproduction: [],
listMfmnsdgoods : [],
search: {
pageSize: 10,
page: 1,
totalPages: 0,
total: 0,
search_LIKE_productname: '',
search_LIKE_producer: '',
search_LIKE_registkey :'',
},
authoritySetting: {
oneRefreshFlag:true,
oneSaveFlag:false,
oneUpdateFlag:false,
oneSearchFlag:true,
oneDeleteFlag:false,
oneStopFlag:false,
oneStartFlag:false,
oneDestroyFlag:false,
oneAddFlag:false,
oneAddFlag:false,
oneStandardToNoStandardFlag:false,
oneNoStandardToStandardFlag:false,
twoDetailFlag:true,
},
};
},
computed: {
dual: function () {
var self = this;
var curMenuRole = this.$store.state.user.curMenuRole;
if (curMenuRole!=undefined && curMenuRole!=null) {
for (var i=0;i<curMenuRole.length;i++) {
if(curMenuRole[i].menu != null) {
if (curMenuRole[i].menu.name == '产品主数据维护') {
for (var j=0;j<curMenuRole[i].buttonList.length;j++) {
// 一级菜单设置
if (!self.authoritySetting.oneAddFlag && curMenuRole[i].buttonList[j].level=='1' && curMenuRole[i].buttonList[j].name =='添加' && curMenuRole[i].buttonList[j].isvalid=='y') {
self.authoritySetting.oneAddFlag = true;
}
if (!self.authoritySetting.oneSearchFlag && curMenuRole[i].buttonList[j].level=='1' && curMenuRole[i].buttonList[j].name =='检索' && curMenuRole[i].buttonList[j].isvalid=='y') {
self.authoritySetting.oneSearchFlag = true;
}
if (!self.authoritySetting.twoDetailFlag && curMenuRole[i].buttonList[j].level=='2' && curMenuRole[i].buttonList[j].name =='明细' && curMenuRole[i].buttonList[j].isvalid=='y') {
self.authoritySetting.twoDetailFlag = true;
}
}
break;
}
}
}
}
//this.$store.state.user.userName;
return '';
}
},
methods: {
getData: function(isRefresh){
var self = this;
if(isRefresh) {
this.search.page = 1;
}
Ajax.get('/dataadmin/listMfmproduction', this.search)
.then(function (response){
var data = response.data.data;
self.$set('listMfmproduction',data.list);
self.search.totalPages = data.totalPages;
})
},
},
route:{
activate : function(){
// this.search.search_LIKE_productName = '';
// this.search_LIKE_productZczh = '';
// this.search_LIKE_zczFactory = '';
this.getData();
}
}
};
</script>