dataadmin-supplier.vue
2.93 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
<template>
<div class="container resource" style="min-height: 447px;">
<div class="pop-banner clearfix">
<div class="operate-btns" >
<a class="fbtn fb-add" v-link="{ path: '/dataAdminSupplierDetail/true'}" >添加</a>
}
</div>
<h3 class="current-module">供应商资料初始化</h3>
</div>
<!-- start-->
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group">
<label for="cn1" class="label">供应商</label>
<div class="control">
<input type="text" maxlength="20" style="width:500px" id="cn1" v-model="search.search_LIKE_chinesename"> </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="w80">序号</th>
<th class="w200">供应商</th>
<th class="w140">状态</th>
<th class="w140">联系人</th>
<th class="w140">联系电话</th>
<th class="w120">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="mfsupplier in listMfsupplier">
<td>{{$index + 1}}</td>
<td>
<div class="p-lr-10">{{mfsupplier.chinesename}}</div>
</td>
<td>{{mfsupplier.bizstate=='Y'?"启用":mfsupplier.bizstate=='S'?"停用":mfsupplier.bizstate=='E'?"作废":""}}</td>
<td>{{mfsupplier.contacts}}</td>
<td>{{mfsupplier.contacttel}}</td>
<td>
<a class="btn-d btn-d-activate" v-link="{ path: '/dataAdminSupplierDetail/'+ mfsupplier.guid}" >明细</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-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
listMfsupplier: [],
search: {
search_LIKE_chinesename: '',
pageSize: 10,
page: 1,
totalPages: 0
},
authoritySetting: {
oneSearchFlag:false,
oneAddFlag:false,
twoDetailFlag:true,
},
};
},
methods: {
getData: function(isRefresh){
var self = this;
if(isRefresh) {
this.search.page = 1;
}
Ajax.get('/dataadmin/listMfsupplier', this.search)
.then(function (response){
var data = response.data.data;
self.$set('listMfsupplier',data.list);
self.search.totalPages = data.totalPages;
})
}
},
route:{
activate : function(){
this.getData();
}
}
};
</script>