Commit ac9c65bb by liangjianmin

Merge branch 'master' of http://119.23.72.7/xiaokang/cloudSystem

parents 445b6e35 e22a1ead
......@@ -21,4 +21,4 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
/view
......@@ -19,7 +19,7 @@ switch (envs) {
break;
case 'test':
//测试环境
NODE_ENVS = '';
NODE_ENVS = 'http://cloud.liexindev.net';
break;
case 'production':
//线上环境
......@@ -29,6 +29,7 @@ switch (envs) {
export const http = (method, url, param,loading) => {
axios.defaults.withCredentials = false; // 不携带cookie
//loading 默认加载loading 传1 不加载
param = param && typeof param === 'object' ? param : {};
let token = Util.getCookie('token') || '';
......@@ -38,16 +39,19 @@ export const http = (method, url, param,loading) => {
transformRequest: [function (param) {
return qs.stringify(param);
}],
headers: {
'Authorization': 'Bearer ' + token
},
loading:(loading?false:true)
};
param.token=token
// if(url!="/auth/cp"&&url!="/auth/login"){
// config.headers={
// 'Authorization': 'Bearer ' + token
// }
// }
// post请求时需要设定Content-Type
if (method === 'post') {
if (method == 'post'||method == 'POST') {
config.data = param;
} else if (method === 'get') {
} else if (method === 'get'||method == 'GET') {
config.params = param;
}
return axios(config);
......
import Vue from 'vue';
import { Loading } from 'element-ui';
Vue.use(Loading)
let loadingCount = 0;
let loading;
......
......@@ -299,7 +299,7 @@
this.tabss(key)
},
logout() {
this.$http('POST', "/auth/logout").then(res => {
this.$http('post', "/auth/logout").then(res => {
Util.delCookie('token');
if (res.err_code === 0) {
window.location.href = '/#/login';
......
......@@ -127,8 +127,9 @@
brand_id: '',
keyword: ''
},
disabled:false,
tableData: "",
timer:null,
multipleSelection: []
};
},
......@@ -212,10 +213,45 @@
},
downOut() {
if(this.disabled){
Message("正在导出中,请不要重复点击");
return
}
this.$http('post', "/api/brand/export_brand", {
brand_id: this.formInline.brand_id,
keyword: this.formInline.keyword,
}).then(res => {})
}).then(res => {
if(res.err_code==0){
this.disabled=true
Message("正在导出中,请耐心等待")
this.timer=setInterval(()=>{
if(!this.disabled){
clearInterval(this.timer)
return
}
this.resultDown(res.data)
},3000)
}
})
},
resultDown(id_){
this.$http('get', "/api/export/get_export_data", {
id:id_
}).then(res => {
if(res.err_code==0){
this.disabled=false
Message("导出成功")
window.location.href=res.data
}else if(res.err_code==-1){
//导出失败
Message(res.data)
this.disabled=false
}
}, error => {
Message('网络出现问题,请检查网络');
this.disabled=false
})
},
del() {
if (this.multipleSelection.length == 0) {
......
......@@ -148,7 +148,8 @@
class_id2: '',
class_id1: ''
},
disabled:false,
timer:null,
tableData: "",
multipleSelection: [],
options: [],
......@@ -281,15 +282,50 @@
},
downOut() {
this.$http('post', "/api/brand/export_spu", {
if(this.disabled){
Message("正在导出中,请不要重复点击");
return
}
this.$http('post', "/api/spu/export_spu", {
spu_name: this.formInline.goods_name,
brand_id: this.formInline.brand_id,
class_id2: this.formInline.class_id2,
class_id1: this.formInline.class_id1,
keyword: this.formInline.keyword,
}).then(res => {})
}).then(res => {
if(res.err_code==0){
this.disabled=true
Message("正在导出中,请耐心等待")
this.timer=setInterval(()=>{
if(!this.disabled){
clearInterval(this.timer)
return
}
this.resultDown(res.data)
},3000)
}
})
},
resultDown(id_){
this.$http('get', "/api/export/get_export_data", {
id:id_
}).then(res => {
if(res.err_code==0){
this.disabled=false
Message("导出成功")
window.location.href=res.data
}else if(res.err_code==-1){
//导出失败
Message(res.data)
this.disabled=false
}
}, error => {
Message('网络出现问题,请检查网络');
this.disabled=false
})
},
handleCurrentChange(val) {
this.page = val;
this.getData();
......
......@@ -3,12 +3,13 @@
<div class="store-con">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="型号">
<el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false" :fetch-suggestions="querySearchAsync"
placeholder="请输入型号" @select="handleSelectGoodsName" ></el-autocomplete>
<el-autocomplete v-model="formInline.goods_name" :trigger-on-focus="false"
:fetch-suggestions="querySearchAsync" placeholder="请输入型号" @select="handleSelectGoodsName"></el-autocomplete>
</el-form-item>
<el-form-item label="品牌">
<el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false" :fetch-suggestions="querySearchAsync2"
placeholder="请输入品牌" @select="handleSelectBrandName" ></el-autocomplete>
<el-autocomplete v-model="formInline.brand_name" :trigger-on-focus="false"
:fetch-suggestions="querySearchAsync2" placeholder="请输入品牌" @select="handleSelectBrandName">
</el-autocomplete>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="formInline.status" placeholder="请选择">
......@@ -178,7 +179,7 @@
<el-table-column label="修改香港交期" min-width="20%">
<template slot-scope="scope">
<div class="updatebox">
<el-input v-model="scope.row.hkhq" placeholder="如:2-5" >
<el-input v-model="scope.row.hkhq" placeholder="如:2-5">
</el-input>
<div class="selectdw">
<el-select v-model="scope.row.hkhqdw" placeholder="天" class="placehoload">
......@@ -253,12 +254,14 @@
huoqidata: [],
kucundata: [],
tableData: [],
brandList:[],
brandList: [],
disabled: false,
timer: null,
};
},
watch: {
},
created() {
this.getData()
......@@ -272,7 +275,7 @@
goods_name: this.formInline.goods_name,
status: this.formInline.status,
brand_id: this.formInline.brand_id,
brand_name:this.formInline.brand_name,
brand_name: this.formInline.brand_name,
action_time: this.formInline.date[0],
end_time: this.formInline.date[1]
}).then(res => {
......@@ -286,21 +289,23 @@
})
},
handleSelectGoodsName(item) {
this.formInline.goods_name=item.value
this.formInline.goods_name = item.value
},
handleSelectBrandName(item){
this.formInline.brand_name=item.value;
this.formInline.brand_id=item.brand_id;
handleSelectBrandName(item) {
this.formInline.brand_name = item.value;
this.formInline.brand_id = item.brand_id;
},
querySearchAsync(queryString, cb) {
this.$http('get', "/api/search/getspu", {
spu_name: this.formInline.goods_name
}).then(res => {
if (res.err_code == 0) {
var arrlist_=res.data||[];
var arr_=[]
for(var i=0;i<arrlist_.length;i++){
arr_.push({value:arrlist_[i]['spu_name']})
var arrlist_ = res.data || [];
var arr_ = []
for (var i = 0; i < arrlist_.length; i++) {
arr_.push({
value: arrlist_[i]['spu_name']
})
}
cb(arr_);
}
......@@ -311,17 +316,24 @@
brand_name: this.formInline.brand_name
}).then(res => {
if (res.err_code == 0) {
var arrlist_=res.data||[];
this.brandList=[]
this.formInline.brand_id=""
for(var i=0;i<arrlist_.length;i++){
this.brandList.push({value:arrlist_[i]['brand_name'],brand_id:arrlist_[i]['brand_id']})
var arrlist_ = res.data || [];
this.brandList = []
this.formInline.brand_id = ""
for (var i = 0; i < arrlist_.length; i++) {
this.brandList.push({
value: arrlist_[i]['brand_name'],
brand_id: arrlist_[i]['brand_id']
})
}
cb(this.brandList);
}
})
},
downOut() {
if (this.disabled) {
Message("正在导出中,请不要重复点击");
return
}
this.$http('get', "/api/sku/exportSku", {
page: this.page,
limit: this.limit,
......@@ -329,7 +341,38 @@
brand_id: this.formInline.brand_id,
action_time: this.formInline.date[0],
end_time: this.formInline.date[1]
}).then(res => {})
}).then(res => {
if (res.err_code == 0) {
this.disabled = true
Message("正在导出中,请耐心等待")
this.timer = setInterval(() => {
if (!this.disabled) {
clearInterval(this.timer)
return
}
this.resultDown(res.data)
}, 3000)
}
})
},
resultDown(id_) {
this.$http('get', "/api/export/get_export_data", {
id: id_
}).then(res => {
if (res.err_code == 0) {
this.disabled = false
Message("导出成功")
window.location.href = res.data
} else if (res.err_code == -1) {
//导出失败
Message(res.data)
this.disabled = false
}
}, error => {
Message('网络出现问题,请检查网络');
this.disabled = false
})
},
onSubmit() {
this.page = 1;
......@@ -356,7 +399,7 @@
//修改货期弹窗
this.dialogVisible2 = true
this.huoqidata = this.selectData
}
},
submitHq() {
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="http://yunxin.liexindev.net/favicon.ico">
<title>cloudsystem</title>
<link href="http://yunxin.liexindev.net/js/app.js" rel="preload" as="script"></head>
<body>
<noscript>
<strong>网络异常,请稍后加载</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
<script type="text/javascript" src="http://yunxin.liexindev.net/js/app.js"></script></body>
</html>
This diff could not be displayed because it is too large.
......@@ -9,7 +9,7 @@ switch (env) {
break;
case 'test':
//测试环境
NODE_ENV = '';
NODE_ENV = 'http://yunxin.liexindev.net';
break;
case 'production':
//线上环境
......
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