Commit b73453ee by 肖康

x

parent e1ed039c
...@@ -15,7 +15,7 @@ export let NODE_ENVS = "/"; ...@@ -15,7 +15,7 @@ export let NODE_ENVS = "/";
switch (envs) { switch (envs) {
case 'development': case 'development':
//开发环境 //开发环境
NODE_ENVS = 'http://192.168.1.27:8080'; NODE_ENVS = 'http://192.168.1.30:8080';
break; break;
case 'test': case 'test':
//测试环境 //测试环境
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
this.page = 1; this.page = 1;
this.getData(); this.getData();
} else { } else {
this.$message(res.err_msg); this.$message(file.response.err_msg);
} }
}, },
......
...@@ -1070,7 +1070,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod ...@@ -1070,7 +1070,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.http = exports.NODE_ENVS = void 0;\n\nvar _axios = _interopRequireDefault(__webpack_require__(/*! axios */ \"./node_modules/axios/index.js\"));\n\nvar _qs = _interopRequireDefault(__webpack_require__(/*! qs */ \"./node_modules/qs/lib/index.js\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../tool */ \"./src/tool/index.js\"));\n\n/**\r\n * 封装axios的通用请求\r\n * @param {string} method get\\post\\put\\delete\r\n * @param {string} url 请求的接口URL\r\n * @param {object} param 传的参数,没有则传空对象\r\n */\nconst envs = \"test\";\nlet NODE_ENVS = \"/\";\nexports.NODE_ENVS = NODE_ENVS;\n\nswitch (envs) {\n case 'development':\n //开发环境\n exports.NODE_ENVS = NODE_ENVS = 'http://192.168.1.27:8080';\n break;\n\n case 'test':\n //测试环境\n exports.NODE_ENVS = NODE_ENVS = 'http://cloud.liexindev.net';\n break;\n\n case 'production':\n //线上环境\n exports.NODE_ENVS = NODE_ENVS = '/';\n break;\n}\n\nconst http = (method, url, param, loading) => {\n //axios.defaults.withCredentials = true; // 携带cookie\n //loading 默认加载loading 传1 不加载\n param = param && typeof param === 'object' ? param : {};\n let token = _tool.default.getCookie('token') || '';\n const config = {\n url: `${NODE_ENVS}${url}`,\n method: method,\n transformRequest: [function (param) {\n return _qs.default.stringify(param);\n }],\n loading: loading ? false : true\n }; //param.token=token\n\n if (url != \"/auth/cp\" && url != \"/auth/login\") {\n config.headers = {\n 'Authorization': 'Bearer ' + token\n };\n } // post请求时需要设定Content-Type\n\n\n if (method == 'post' || method == 'POST') {\n config.data = param;\n } else if (method === 'get' || method == 'GET') {\n config.params = param;\n }\n\n return (0, _axios.default)(config);\n};\n\nexports.http = http;\n\n//# sourceURL=webpack:///./src/ajax/index.js?"); eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.http = exports.NODE_ENVS = void 0;\n\nvar _axios = _interopRequireDefault(__webpack_require__(/*! axios */ \"./node_modules/axios/index.js\"));\n\nvar _qs = _interopRequireDefault(__webpack_require__(/*! qs */ \"./node_modules/qs/lib/index.js\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../tool */ \"./src/tool/index.js\"));\n\n/**\r\n * 封装axios的通用请求\r\n * @param {string} method get\\post\\put\\delete\r\n * @param {string} url 请求的接口URL\r\n * @param {object} param 传的参数,没有则传空对象\r\n */\nconst envs = \"test\";\nlet NODE_ENVS = \"/\";\nexports.NODE_ENVS = NODE_ENVS;\n\nswitch (envs) {\n case 'development':\n //开发环境\n exports.NODE_ENVS = NODE_ENVS = 'http://192.168.1.30:8080';\n break;\n\n case 'test':\n //测试环境\n exports.NODE_ENVS = NODE_ENVS = 'http://cloud.liexindev.net';\n break;\n\n case 'production':\n //线上环境\n exports.NODE_ENVS = NODE_ENVS = '/';\n break;\n}\n\nconst http = (method, url, param, loading) => {\n //axios.defaults.withCredentials = true; // 携带cookie\n //loading 默认加载loading 传1 不加载\n param = param && typeof param === 'object' ? param : {};\n let token = _tool.default.getCookie('token') || '';\n const config = {\n url: `${NODE_ENVS}${url}`,\n method: method,\n transformRequest: [function (param) {\n return _qs.default.stringify(param);\n }],\n loading: loading ? false : true\n }; //param.token=token\n\n if (url != \"/auth/cp\" && url != \"/auth/login\") {\n config.headers = {\n 'Authorization': 'Bearer ' + token\n };\n } // post请求时需要设定Content-Type\n\n\n if (method == 'post' || method == 'POST') {\n config.data = param;\n } else if (method === 'get' || method == 'GET') {\n config.params = param;\n }\n\n return (0, _axios.default)(config);\n};\n\nexports.http = http;\n\n//# sourceURL=webpack:///./src/ajax/index.js?");
/***/ }), /***/ }),
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="http://yunxin.liexindev.net/favicon.ico"> <link rel="icon" href="http://yunxin.liexindev.net/favicon.ico">
<title>cloudsystem</title> <title>cloudsystem</title>
<link href="http://yunxin.liexindev.net/js/0.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/1.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/10.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/11.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/12.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/13.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/14.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/15.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/16.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/17.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/18.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/19.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/2.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/20.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/21.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/22.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/23.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/24.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/25.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/26.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/27.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/28.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/3.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/4.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/5.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/6.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/7.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/8.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/9.js" rel="prefetch"><link href="http://yunxin.liexindev.net/app.262b962e34855bb2016b.js" rel="preload" as="script"></head> <link href="http://yunxin.liexindev.net/js/0.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/1.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/10.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/11.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/12.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/13.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/14.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/15.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/16.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/17.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/18.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/19.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/2.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/20.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/21.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/22.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/23.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/24.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/25.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/26.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/27.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/28.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/3.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/4.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/5.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/6.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/7.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/8.js" rel="prefetch"><link href="http://yunxin.liexindev.net/js/9.js" rel="prefetch"><link href="http://yunxin.liexindev.net/app.df8ae05cf22eff5bbd0b.js" rel="preload" as="script"></head>
<body> <body>
<noscript> <noscript>
<strong>网络异常,请稍后加载</strong> <strong>网络异常,请稍后加载</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script type="text/javascript" src="http://yunxin.liexindev.net/app.262b962e34855bb2016b.js"></script></body> <script type="text/javascript" src="http://yunxin.liexindev.net/app.df8ae05cf22eff5bbd0b.js"></script></body>
</html> </html>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _upload = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/upload.css */ \"./node_modules/element-ui/lib/theme-chalk/upload.css\"));\n\nvar _upload2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/upload */ \"./node_modules/element-ui/lib/upload.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\nvar _ajax = __webpack_require__(/*! ../../ajax */ \"./src/ajax/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_upload2.default);\n\nvar _default = {\n name: \"enter\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n uploadUrl: _ajax.NODE_ENVS + '/api/uploadSku/import',\n fileData: {\n token: _tool.default.getCookie('token')\n },\n downUrl: _ajax.NODE_ENVS + '/api/uploadSku/downUploadCsv?token=' + _tool.default.getCookie('token'),\n formInline: {\n status: '',\n date: ''\n },\n tableData: \"\",\n multipleSelection: []\n };\n },\n\n watch: {\n 'formInline.date'(val) {\n if (!val) {\n this.formInline.date = [];\n }\n }\n\n },\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/uploadSku/list\", {\n page: this.page,\n limit: this.limit,\n status: this.formInline.status,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.total) || 0;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n handleChange(file, fileList) {\n console.log(file.response);\n\n if (!file.response) {\n return;\n }\n\n if (file.response.err_code === 0) {\n this.$message(\"导入成功\");\n this.page = 1;\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n },\n\n checkdr() {\n if (this.multipleSelection.length > 1) {\n this.$message(\"只能选择一条数据导入\");\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据导入\");\n return;\n }\n\n this.downHref = _ajax.NODE_ENVS + '/api/uploadSku/downResult?id=' + this.multipleSelection[0]['id'] + '&token=' + _tool.default.getCookie('token');\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n },\n\n del() {\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('get', \"/api/uploadSku/del\", {\n log_ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n }).catch(() => {});\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/enter.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _upload = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/upload.css */ \"./node_modules/element-ui/lib/theme-chalk/upload.css\"));\n\nvar _upload2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/upload */ \"./node_modules/element-ui/lib/upload.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\nvar _ajax = __webpack_require__(/*! ../../ajax */ \"./src/ajax/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_upload2.default);\n\nvar _default = {\n name: \"enter\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n uploadUrl: _ajax.NODE_ENVS + '/api/uploadSku/import',\n fileData: {\n token: _tool.default.getCookie('token')\n },\n downUrl: _ajax.NODE_ENVS + '/api/uploadSku/downUploadCsv?token=' + _tool.default.getCookie('token'),\n formInline: {\n status: '',\n date: ''\n },\n tableData: \"\",\n multipleSelection: []\n };\n },\n\n watch: {\n 'formInline.date'(val) {\n if (!val) {\n this.formInline.date = [];\n }\n }\n\n },\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/uploadSku/list\", {\n page: this.page,\n limit: this.limit,\n status: this.formInline.status,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.total) || 0;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n handleChange(file, fileList) {\n console.log(file.response);\n\n if (!file.response) {\n return;\n }\n\n if (file.response.err_code === 0) {\n this.$message(\"导入成功\");\n this.page = 1;\n this.getData();\n } else {\n this.$message(file.response.err_msg);\n }\n },\n\n checkdr() {\n if (this.multipleSelection.length > 1) {\n this.$message(\"只能选择一条数据导入\");\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据导入\");\n return;\n }\n\n this.downHref = _ajax.NODE_ENVS + '/api/uploadSku/downResult?id=' + this.multipleSelection[0]['id'] + '&token=' + _tool.default.getCookie('token');\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n },\n\n del() {\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('get', \"/api/uploadSku/del\", {\n log_ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n }).catch(() => {});\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/enter.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options");
/***/ }), /***/ }),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment