Showing
2 changed files
with
21 additions
and
167 deletions
| ... | @@ -8,7 +8,6 @@ | ... | @@ -8,7 +8,6 @@ |
| 8 | :queryForm="queryForm" | 8 | :queryForm="queryForm" |
| 9 | :inline="false" | 9 | :inline="false" |
| 10 | formWidth="auto" | 10 | formWidth="auto" |
| 11 | - @blur="blurEvent" | ||
| 12 | /> | 11 | /> |
| 13 | </el-col> | 12 | </el-col> |
| 14 | </el-row> | 13 | </el-row> |
| ... | @@ -22,7 +21,6 @@ | ... | @@ -22,7 +21,6 @@ |
| 22 | @search="searchBtn" | 21 | @search="searchBtn" |
| 23 | @download="downloadTemplate" | 22 | @download="downloadTemplate" |
| 24 | @upload="toUpload" | 23 | @upload="toUpload" |
| 25 | - @rmfile="onRemoveUpload" | ||
| 26 | @export="exportTemplate" | 24 | @export="exportTemplate" |
| 27 | @delete="deleteData" | 25 | @delete="deleteData" |
| 28 | @sizeChange="handleSizeChange" | 26 | @sizeChange="handleSizeChange" |
| ... | @@ -30,62 +28,11 @@ | ... | @@ -30,62 +28,11 @@ |
| 30 | @selectionEvent="tableSelectionChange" | 28 | @selectionEvent="tableSelectionChange" |
| 31 | > | 29 | > |
| 32 | </yl-table> | 30 | </yl-table> |
| 33 | - <!-- <modle-view | ||
| 34 | - ref="modleViewRef" | ||
| 35 | - width="30%" | ||
| 36 | - title="导入Excel" | ||
| 37 | - confirmBtnName="导入Excel" | ||
| 38 | - @confirm="dialogConfirm" | ||
| 39 | - > | ||
| 40 | - <el-form | ||
| 41 | - :model="paramsForm" | ||
| 42 | - :rules="rules" | ||
| 43 | - ref="ruleForm" | ||
| 44 | - label-width="80px" | ||
| 45 | - > | ||
| 46 | - <el-row> | ||
| 47 | - <el-col :span="20"> | ||
| 48 | - <el-form-item | ||
| 49 | - label="商品名称" | ||
| 50 | - prop="skuName" | ||
| 51 | - size="small" | ||
| 52 | - label-position="left" | ||
| 53 | - > | ||
| 54 | - <el-input | ||
| 55 | - v-model="paramsForm.skuName" | ||
| 56 | - placeholder="请输入商品名称" | ||
| 57 | - ></el-input> | ||
| 58 | - </el-form-item> | ||
| 59 | - </el-col> | ||
| 60 | - </el-row> | ||
| 61 | - <el-row> | ||
| 62 | - <el-col> | ||
| 63 | - <el-form-item prop="file"> | ||
| 64 | - <el-upload | ||
| 65 | - ref="upload" | ||
| 66 | - action="/goods/uploadGoodsExcel" | ||
| 67 | - name="file" | ||
| 68 | - :http-request="toUpload" | ||
| 69 | - :on-remove="onRemoveUpload" | ||
| 70 | - :limit="1" | ||
| 71 | - accept=".xlsx" | ||
| 72 | - class="upload" | ||
| 73 | - > | ||
| 74 | - <el-button type="primary" icon="el-icon-upload2" size="small" | ||
| 75 | - >选择文件</el-button | ||
| 76 | - > | ||
| 77 | - </el-upload> | ||
| 78 | - </el-form-item> | ||
| 79 | - </el-col> | ||
| 80 | - </el-row> | ||
| 81 | - </el-form> | ||
| 82 | - </modle-view> --> | ||
| 83 | </div> | 31 | </div> |
| 84 | </template> | 32 | </template> |
| 85 | <script> | 33 | <script> |
| 86 | import YlForm from "@/components/YlForm"; | 34 | import YlForm from "@/components/YlForm"; |
| 87 | import YlTable from "@/components/YlTable"; | 35 | import YlTable from "@/components/YlTable"; |
| 88 | -import ModleView from "./components/ModleView"; | ||
| 89 | import { formConfig } from "./formConfig"; | 36 | import { formConfig } from "./formConfig"; |
| 90 | import { tableAttr, columnHeader } from "./tableConfig"; | 37 | import { tableAttr, columnHeader } from "./tableConfig"; |
| 91 | import { restTableHeight } from "@/utils"; | 38 | import { restTableHeight } from "@/utils"; |
| ... | @@ -101,7 +48,6 @@ export default { | ... | @@ -101,7 +48,6 @@ export default { |
| 101 | components: { | 48 | components: { |
| 102 | YlForm, | 49 | YlForm, |
| 103 | YlTable, | 50 | YlTable, |
| 104 | - ModleView, | ||
| 105 | }, | 51 | }, |
| 106 | data() { | 52 | data() { |
| 107 | return { | 53 | return { |
| ... | @@ -109,15 +55,6 @@ export default { | ... | @@ -109,15 +55,6 @@ export default { |
| 109 | queryForm: { | 55 | queryForm: { |
| 110 | searchValue: "", | 56 | searchValue: "", |
| 111 | }, // 表单参数 | 57 | }, // 表单参数 |
| 112 | - paramsForm: { | ||
| 113 | - skuName: "", | ||
| 114 | - file: null, | ||
| 115 | - }, | ||
| 116 | - rules: { | ||
| 117 | - skuName: [ | ||
| 118 | - { required: true, message: "请输入商品名称", trigger: "blur" }, | ||
| 119 | - ], | ||
| 120 | - }, | ||
| 121 | pageConfig: { | 58 | pageConfig: { |
| 122 | // 分页配置项 | 59 | // 分页配置项 |
| 123 | isPagination: true, | 60 | isPagination: true, |
| ... | @@ -180,8 +117,6 @@ export default { | ... | @@ -180,8 +117,6 @@ export default { |
| 180 | }) | 117 | }) |
| 181 | .catch(() => {}); | 118 | .catch(() => {}); |
| 182 | }, | 119 | }, |
| 183 | - // 失焦事件 | ||
| 184 | - blurEvent() {}, | ||
| 185 | // 选择上传【HScode黑名单导入】 | 120 | // 选择上传【HScode黑名单导入】 |
| 186 | toUpload({ file }) { | 121 | toUpload({ file }) { |
| 187 | const formData = new FormData(); | 122 | const formData = new FormData(); |
| ... | @@ -206,20 +141,6 @@ export default { | ... | @@ -206,20 +141,6 @@ export default { |
| 206 | }) | 141 | }) |
| 207 | .catch(() => {}); | 142 | .catch(() => {}); |
| 208 | }, | 143 | }, |
| 209 | - //移除上传 | ||
| 210 | - onRemoveUpload(options) { | ||
| 211 | - console.log(options); | ||
| 212 | - }, | ||
| 213 | - // 搜索 | ||
| 214 | - searchBtn() { | ||
| 215 | - this.pageConfig.pageData.page = 1; | ||
| 216 | - this.pageConfig.pageData.size = 10; | ||
| 217 | - this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 218 | - this.queryFindHsCodeList(); | ||
| 219 | - }); | ||
| 220 | - }, | ||
| 221 | - // 确认对话框 | ||
| 222 | - dialogConfirm() {}, | ||
| 223 | // 下载【HScode黑名单下载模板】 | 144 | // 下载【HScode黑名单下载模板】 |
| 224 | downloadTemplate() { | 145 | downloadTemplate() { |
| 225 | downLoadTemplate("hsCode") | 146 | downLoadTemplate("hsCode") |
| ... | @@ -240,10 +161,6 @@ export default { | ... | @@ -240,10 +161,6 @@ export default { |
| 240 | }) | 161 | }) |
| 241 | .catch(() => {}); | 162 | .catch(() => {}); |
| 242 | }, | 163 | }, |
| 243 | - // 上传 | ||
| 244 | - upLoadTemplate() { | ||
| 245 | - // console.log(this.$refs.modleViewRef); | ||
| 246 | - }, | ||
| 247 | // 导出 | 164 | // 导出 |
| 248 | exportTemplate(row, i) { | 165 | exportTemplate(row, i) { |
| 249 | this.tableAttr.btnCofig.btnGroup[i].loading = true; | 166 | this.tableAttr.btnCofig.btnGroup[i].loading = true; |
| ... | @@ -276,6 +193,14 @@ export default { | ... | @@ -276,6 +193,14 @@ export default { |
| 276 | this.$message.error("请勾选一条或者多条数据再操作!"); | 193 | this.$message.error("请勾选一条或者多条数据再操作!"); |
| 277 | } | 194 | } |
| 278 | }, | 195 | }, |
| 196 | + // 搜索 | ||
| 197 | + searchBtn() { | ||
| 198 | + this.pageConfig.pageData.page = 1; | ||
| 199 | + this.pageConfig.pageData.size = 10; | ||
| 200 | + this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 201 | + this.queryFindHsCodeList(); | ||
| 202 | + }); | ||
| 203 | + }, | ||
| 279 | //条数变化 | 204 | //条数变化 |
| 280 | handleSizeChange(e) { | 205 | handleSizeChange(e) { |
| 281 | this.pageConfig.pageData.size = e; | 206 | this.pageConfig.pageData.size = e; | ... | ... |
| ... | @@ -8,7 +8,6 @@ | ... | @@ -8,7 +8,6 @@ |
| 8 | :queryForm="queryForm" | 8 | :queryForm="queryForm" |
| 9 | :inline="false" | 9 | :inline="false" |
| 10 | formWidth="auto" | 10 | formWidth="auto" |
| 11 | - @blur="blurEvent" | ||
| 12 | /> | 11 | /> |
| 13 | </el-col> | 12 | </el-col> |
| 14 | </el-row> | 13 | </el-row> |
| ... | @@ -21,7 +20,6 @@ | ... | @@ -21,7 +20,6 @@ |
| 21 | :pageConfig="pageConfig" | 20 | :pageConfig="pageConfig" |
| 22 | @search="searchBtn" | 21 | @search="searchBtn" |
| 23 | @upload="toUpload" | 22 | @upload="toUpload" |
| 24 | - @rmfile="onRemoveUpload" | ||
| 25 | @export="exportTemplate" | 23 | @export="exportTemplate" |
| 26 | @delete="deleteData" | 24 | @delete="deleteData" |
| 27 | @sizeChange="handleSizeChange" | 25 | @sizeChange="handleSizeChange" |
| ... | @@ -29,62 +27,11 @@ | ... | @@ -29,62 +27,11 @@ |
| 29 | @selectionEvent="tableSelectionChange" | 27 | @selectionEvent="tableSelectionChange" |
| 30 | > | 28 | > |
| 31 | </yl-table> | 29 | </yl-table> |
| 32 | - <!-- <modle-view | ||
| 33 | - ref="modleViewRef" | ||
| 34 | - width="30%" | ||
| 35 | - title="导入Excel" | ||
| 36 | - confirmBtnName="导入Excel" | ||
| 37 | - @confirm="dialogConfirm" | ||
| 38 | - > | ||
| 39 | - <el-form | ||
| 40 | - :model="paramsForm" | ||
| 41 | - :rules="rules" | ||
| 42 | - ref="ruleForm" | ||
| 43 | - label-width="80px" | ||
| 44 | - > | ||
| 45 | - <el-row> | ||
| 46 | - <el-col :span="20"> | ||
| 47 | - <el-form-item | ||
| 48 | - label="商品名称" | ||
| 49 | - prop="skuName" | ||
| 50 | - size="small" | ||
| 51 | - label-position="left" | ||
| 52 | - > | ||
| 53 | - <el-input | ||
| 54 | - v-model="paramsForm.skuName" | ||
| 55 | - placeholder="请输入商品名称" | ||
| 56 | - ></el-input> | ||
| 57 | - </el-form-item> | ||
| 58 | - </el-col> | ||
| 59 | - </el-row> | ||
| 60 | - <el-row> | ||
| 61 | - <el-col> | ||
| 62 | - <el-form-item prop="file"> | ||
| 63 | - <el-upload | ||
| 64 | - ref="upload" | ||
| 65 | - action="/goods/uploadGoodsExcel" | ||
| 66 | - name="file" | ||
| 67 | - :http-request="toUpload" | ||
| 68 | - :on-remove="onRemoveUpload" | ||
| 69 | - :limit="1" | ||
| 70 | - accept=".xlsx" | ||
| 71 | - class="upload" | ||
| 72 | - > | ||
| 73 | - <el-button type="primary" icon="el-icon-upload2" size="small" | ||
| 74 | - >选择文件</el-button | ||
| 75 | - > | ||
| 76 | - </el-upload> | ||
| 77 | - </el-form-item> | ||
| 78 | - </el-col> | ||
| 79 | - </el-row> | ||
| 80 | - </el-form> | ||
| 81 | - </modle-view> --> | ||
| 82 | </div> | 30 | </div> |
| 83 | </template> | 31 | </template> |
| 84 | <script> | 32 | <script> |
| 85 | import YlForm from "@/components/YlForm"; | 33 | import YlForm from "@/components/YlForm"; |
| 86 | import YlTable from "@/components/YlTable"; | 34 | import YlTable from "@/components/YlTable"; |
| 87 | -import ModleView from "./components/ModleView"; | ||
| 88 | import { formConfig } from "./formConfig"; | 35 | import { formConfig } from "./formConfig"; |
| 89 | import { tableAttr, columnHeader } from "./tableConfig"; | 36 | import { tableAttr, columnHeader } from "./tableConfig"; |
| 90 | import { restTableHeight } from "@/utils"; | 37 | import { restTableHeight } from "@/utils"; |
| ... | @@ -99,7 +46,6 @@ export default { | ... | @@ -99,7 +46,6 @@ export default { |
| 99 | components: { | 46 | components: { |
| 100 | YlForm, | 47 | YlForm, |
| 101 | YlTable, | 48 | YlTable, |
| 102 | - ModleView, | ||
| 103 | }, | 49 | }, |
| 104 | data() { | 50 | data() { |
| 105 | return { | 51 | return { |
| ... | @@ -107,15 +53,6 @@ export default { | ... | @@ -107,15 +53,6 @@ export default { |
| 107 | queryForm: { | 53 | queryForm: { |
| 108 | searchValue: "", | 54 | searchValue: "", |
| 109 | }, // 表单参数 | 55 | }, // 表单参数 |
| 110 | - paramsForm: { | ||
| 111 | - skuName: "", | ||
| 112 | - file: null, | ||
| 113 | - }, | ||
| 114 | - rules: { | ||
| 115 | - skuName: [ | ||
| 116 | - { required: true, message: "请输入ShipmentDesc", trigger: "blur" }, | ||
| 117 | - ], | ||
| 118 | - }, | ||
| 119 | pageConfig: { | 56 | pageConfig: { |
| 120 | // 分页配置项 | 57 | // 分页配置项 |
| 121 | isPagination: true, | 58 | isPagination: true, |
| ... | @@ -178,8 +115,6 @@ export default { | ... | @@ -178,8 +115,6 @@ export default { |
| 178 | }) | 115 | }) |
| 179 | .catch(() => {}); | 116 | .catch(() => {}); |
| 180 | }, | 117 | }, |
| 181 | - // 失焦事件 | ||
| 182 | - blurEvent() {}, | ||
| 183 | // 选择上传【HScode黑名单导入】 | 118 | // 选择上传【HScode黑名单导入】 |
| 184 | toUpload({ file }) { | 119 | toUpload({ file }) { |
| 185 | const formData = new FormData(); | 120 | const formData = new FormData(); |
| ... | @@ -204,28 +139,14 @@ export default { | ... | @@ -204,28 +139,14 @@ export default { |
| 204 | }) | 139 | }) |
| 205 | .catch(() => {}); | 140 | .catch(() => {}); |
| 206 | }, | 141 | }, |
| 207 | - //移除上传 | ||
| 208 | - onRemoveUpload(options) { | ||
| 209 | - console.log(options); | ||
| 210 | - }, | ||
| 211 | - // 搜索 | ||
| 212 | - searchBtn() { | ||
| 213 | - this.pageConfig.pageData.page = 1; | ||
| 214 | - this.pageConfig.pageData.size = 10; | ||
| 215 | - this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 216 | - this.queryFindShipmentDescList(); | ||
| 217 | - }); | ||
| 218 | - }, | ||
| 219 | - // 确认对话框 | ||
| 220 | - dialogConfirm() {}, | ||
| 221 | - // 上传 | ||
| 222 | - upLoadTemplate() { | ||
| 223 | - // console.log(this.$refs.modleViewRef); | ||
| 224 | - }, | ||
| 225 | // 导出 | 142 | // 导出 |
| 226 | exportTemplate(row, i) { | 143 | exportTemplate(row, i) { |
| 227 | this.tableAttr.btnCofig.btnGroup[i].loading = true; | 144 | this.tableAttr.btnCofig.btnGroup[i].loading = true; |
| 228 | - downLoadXlsx("/etes/exportShipmentDescList", this.queryForm, "HSCODE英文品名黑名单表") | 145 | + downLoadXlsx( |
| 146 | + "/etes/exportShipmentDescList", | ||
| 147 | + this.queryForm, | ||
| 148 | + "HSCODE英文品名黑名单表" | ||
| 149 | + ) | ||
| 229 | .then(() => { | 150 | .then(() => { |
| 230 | this.tableAttr.btnCofig.btnGroup[i].loading = false; | 151 | this.tableAttr.btnCofig.btnGroup[i].loading = false; |
| 231 | }) | 152 | }) |
| ... | @@ -254,6 +175,14 @@ export default { | ... | @@ -254,6 +175,14 @@ export default { |
| 254 | this.$message.error("请勾选一条或者多条数据再操作!"); | 175 | this.$message.error("请勾选一条或者多条数据再操作!"); |
| 255 | } | 176 | } |
| 256 | }, | 177 | }, |
| 178 | + // 搜索 | ||
| 179 | + searchBtn() { | ||
| 180 | + this.pageConfig.pageData.page = 1; | ||
| 181 | + this.pageConfig.pageData.size = 10; | ||
| 182 | + this.$refs.ruleForm.handleSearch("ruleForm", (val) => { | ||
| 183 | + this.queryFindShipmentDescList(); | ||
| 184 | + }); | ||
| 185 | + }, | ||
| 257 | //条数变化 | 186 | //条数变化 |
| 258 | handleSizeChange(e) { | 187 | handleSizeChange(e) { |
| 259 | this.pageConfig.pageData.size = e; | 188 | this.pageConfig.pageData.size = e; | ... | ... |
-
Please register or login to post a comment