export-goods.vue
7.92 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
<!--出库登录:列表-->
<template>
<div>
<div class="container resource close-left-menu">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a v-on:click="downModel" class="fbtn fb-download">导出模板</a>
<upload-excel-plan :class="['fbtn fb-upload']" :tag="tagType" :type="fileType" :label="fileLabel"
:exceltype="mfmproductionImpl" v-on:file-change="getBackTips"
></upload-excel-plan>
<a v-link="{path:'/dataAdminGoods/0'}" href="javascript:void(0)" class="fbtn fb-return">返回</a>
</div>
<h3 class="current-module">器械主数据导入</h3>
</div>
<div class="operation-list clearfix">
<section>
<div class="search-result mt-0">
<div class="statistics">
您共导入 <em>{{mfproductList.length}}</em> 条产品
</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="w50">商品大类</th>
</tr>
</thead>
<tbody>
<tr v-for="goods in mfproductList">
<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>
</tr>
</tbody>
</table>
</section>
<!--v-if="mfmedList.length>0"-->
<section class="ct-row table-no-border active">
<div class="search-result ">
<div class="statistics">
对应生成了 <em>{{mfmedList.length}}</em> 条商品
</div>
</div>
<div class="fheader no-bottom ">
<h4 class="no-l-icon">商品资料</h4>
</div>
<div class="row-launch mb-20">
<table class="itable itable-td-long-text itable-thead-13px">
<thead>
<tr>
<th class="w50">序号</th>
<th class="w100">商品编码</th>
<th class="w100">商品名称</th>
<th class="w70">规格</th>
<th class="w80">生产厂商</th>
<th class="w70">注册证号</th>
<th class="w80">生产来源</th>
<th class="w70">商品大类</th>
</tr>
</thead>
<tbody>
<tr class="txt_v" :bind='ind=$index' v-for='item in mfmedList'>
<td>{{$index + 1}}</td>
<td>{{item.goodscode}}</td>
<td class="t-left">{{item.goodsname}}</td>
<td>{{item.goodsspec}}</td>
<td>{{item.producer}}</td>
<td>{{item.registkey}}</td>
<td>{{item.importedflag|IMPORTEDFLAG}}</td>
<td>{{item.goodscate|GOODSCATE}}</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</div>
<div class="modal " :class="backMessage.showDialog=='Y'?'':'hide'">
<div class="container resource">
<div class="audit-detail" style="width:540px;">
<span class="close-win" v-on:click="closeDialog()"></span>
<div class="sdiv-9-9b">
<a class="btn button-green mar-none" href="javascript:;">导入信息提示</a>
</div>
<div class="status-process wbe-0 clearfix pd20" style="padding-top:0px;">
<div class="sp-head sp-headb" v-for="m in backMessage.mList">
<span class="sp-col w300">
<span class="control radio-control "><span>{{m}}</span></span>
</span>
</div>
</div>
<div class="sdiv9-9">
<button v-on:click="closeDialog()" class="btn button-red mar-none">关闭</button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
module.exports = {
data: function () {
return {
fileType: 'file',
tagType: 'a',
fileLabel: '批量导入',
mfmproductionImpl: 'mfmsdgoodsAndProductionImpl',
// 明细数据
medList: [],
// 订单总数量
totalNum: 0,
billno: '',
mfmedList: [],
mfproductList: '',
backMessage: {
showDialog: 'N',
mList: [],
},
};
},
methods: {
// 清空临时表数据
getData: function () {
var self = this;
self.totalNum = 0;
self.$set('mfmedList', []);
self.$set('mfproductList', []);
},
// 下载模版
downModel: function () {
var self = this;
// mfmsdProductionImp.xls
window.open('excel/mfmsdProductionImp.xls')
// window.open('https://csylcloud-file.obs.cn-north-1.myhwclouds.com/templet/mfmsdProductionImp.xls')
},
// 导入账户
getBackTips: function (data) {
var self = this;
console.log(data)
if (data.data.mfmproductionList.length >= 0) {
self.mfproductList = data.data.mfmproductionList;
}
if (data.data.mfmsdgoodsList.length >= 0) {
self.mfmedList = data.data.mfmsdgoodsList;
}
if (data.data.resList.length != 0) {
// 返回信息
self.$set('backMessage.showDialog', 'Y');
self.$set('backMessage.mList', data.data.resList);
return;
}
console.log(data.data.resList)
},
closeDialog: function () {
this.$set('backMessage.showDialog', 'N');
this.$set('backMessage.mList', []);
},
},
route: {
activate: function () {
this.getData();
}
},
};
</script>