jinhui.wang

货站品名增加品名查询条件

...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
8 <el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable /> 8 <el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable />
9 </el-form-item> 9 </el-form-item>
10 </el-col> 10 </el-col>
11 + <el-col :span="6">
12 + <el-form-item label="品名">
13 + <el-input v-model="selectionData.goodsName" placeholder="请输入货站名称" maxlength="50" clearable />
14 + </el-form-item>
15 + </el-col>
11 </el-row> 16 </el-row>
12 </el-form> 17 </el-form>
13 <div style="display:flex;padding:10px 20px"> 18 <div style="display:flex;padding:10px 20px">
...@@ -28,6 +33,10 @@ ...@@ -28,6 +33,10 @@
28 class="upload-demo" v-hasPermi="['base:goodsStation:add']"> 33 class="upload-demo" v-hasPermi="['base:goodsStation:add']">
29 <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button> 34 <el-button type="primary" icon="el-icon-upload2" size="small">导入Excel</el-button>
30 </el-upload> 35 </el-upload>
36 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-left:10px"
37 + @click="downloadExcel">
38 + 导出Excel
39 + </el-button>
31 </div> 40 </div>
32 <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true" 41 <Tables ref="goodsStation" ductName="goodsStation" :data="tableData" :headerData="tableHeader" :selection="true"
33 :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading" 42 :order="true" :selectFixed="false" :totalCount="totalCount" :loading="loading"
...@@ -43,8 +52,7 @@ ...@@ -43,8 +52,7 @@
43 </el-table-column> 52 </el-table-column>
44 </template> 53 </template>
45 </Tables> 54 </Tables>
46 - <Dialog :open="open" @close="close" /> 55 + <Dialog :open="open" :openStatus="openStatus" @close="close" />
47 - <UpDateResult :dialogVisible="resultOpen" :resultData="errorData" @close="resultClose" />
48 </div> 56 </div>
49 </template> 57 </template>
50 58
...@@ -64,6 +72,7 @@ export default { ...@@ -64,6 +72,7 @@ export default {
64 return { 72 return {
65 selectionData: { 73 selectionData: {
66 goodsStation: '', 74 goodsStation: '',
75 + goodsName: '',
67 size: 20, 76 size: 20,
68 page: 1 77 page: 1
69 }, 78 },
...@@ -74,9 +83,9 @@ export default { ...@@ -74,9 +83,9 @@ export default {
74 errorData: [], 83 errorData: [],
75 tableHeight: null, 84 tableHeight: null,
76 totalCount: 0, 85 totalCount: 0,
86 + openStatus: '',
77 loading: false, 87 loading: false,
78 open: false, 88 open: false,
79 - resultOpen: false,
80 } 89 }
81 }, 90 },
82 created() { 91 created() {
...@@ -118,6 +127,7 @@ export default { ...@@ -118,6 +127,7 @@ export default {
118 //新增 127 //新增
119 add() { 128 add() {
120 this.open = true 129 this.open = true
130 + this.openStatus = 'add'
121 }, 131 },
122 //删除 132 //删除
123 del(val) { 133 del(val) {
...@@ -160,6 +170,11 @@ export default { ...@@ -160,6 +170,11 @@ export default {
160 console.log(err) 170 console.log(err)
161 }) 171 })
162 }, 172 },
173 + //导出
174 + downloadExcel() {
175 + this.open = true
176 + this.openStatus = 'downloadExcel'
177 + },
163 //复选 178 //复选
164 tableSelect(val) { 179 tableSelect(val) {
165 this.checkData = val.selection 180 this.checkData = val.selection
...@@ -186,15 +201,14 @@ export default { ...@@ -186,15 +201,14 @@ export default {
186 type: "warning", 201 type: "warning",
187 }); 202 });
188 } else { 203 } else {
204 + if (this.errorData.length > 0) {
189 this.$message.warning(res.msg); 205 this.$message.warning(res.msg);
190 this.errorData = res.data; 206 this.errorData = res.data;
191 - if (this.errorData.length > 0) { 207 + this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
192 - this.resultOpen = true
193 } 208 }
194 } 209 }
195 } else { 210 } else {
196 this.$message.success(res.msg); 211 this.$message.success(res.msg);
197 - this.errorData = res.data;
198 this.selection(1) 212 this.selection(1)
199 } 213 }
200 }); 214 });
...@@ -233,6 +247,7 @@ export default { ...@@ -233,6 +247,7 @@ export default {
233 }, 247 },
234 close() { 248 close() {
235 this.open = false 249 this.open = false
250 + this.openStatus = ''
236 this.selection(1) 251 this.selection(1)
237 }, 252 },
238 resultClose() { 253 resultClose() {
......