Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
b2d86fab
提交
b2d86fab
authored
4月 29, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、入驻,获取品牌信息
2、变动金额修复 3、资产-账户管理-限制最多增加3条数据 4、运费-运费模板-新增优化,批量删除修复 5、商品-上架商品-增加商品下架功能 6、拦截器优化,抛出所有错误提示
上级
c510ab4d
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
147 行增加
和
98 行删除
+147
-98
.env.development
.env.development
+3
-1
request.js
src/utils/request.js
+32
-14
fillBrandInf.vue
src/views/entry/fillBrandInf.vue
+2
-2
index.vue
src/views/system/asset/balance/index.vue
+1
-1
index.vue
src/views/system/asset/bankcard/index.vue
+6
-4
index.vue
src/views/system/freight/freight_list/index.vue
+47
-30
indexbtn.vue
src/views/system/freight/freight_list/indexbtn.vue
+27
-44
index.vue
src/views/system/goods/onsale/index.vue
+29
-2
没有找到文件。
.env.development
浏览文件 @
b2d86fab
# 开发环境配置
ENV = 'development'
#
gfast管理系统/开发
环境
#
正式
环境
VUE_APP_BASE_API = 'http://sjapi.jxhh.com'
# 达叔 开发环境
#VUE_APP_BASE_API = 'http://192.168.111.32:8200'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
src/utils/request.js
浏览文件 @
b2d86fab
...
...
@@ -15,11 +15,11 @@ const service = axios.create({
// request拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
// 是否需要设置 token
const
isToken
=
(
config
.
headers
||
{}).
isToken
===
false
;
const
isToken
=
(
config
.
headers
||
{}).
isToken
===
false
if
(
getToken
()
&&
!
isToken
)
{
config
.
headers
[
'Authorization'
]
=
'Bearer '
+
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
}
//config.headers['Authorization'] = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxNTcxMTEzOTg5NSIsInVpZCI6NTI4MjgsImNoYW5uZWxJZCI6MCwiZXhwIjoxNjE5N
jc2MDMzLCJpc3MiOiJnaW4tYmxvZyJ9.ccnrAoIMRLQV1MAAII6J3F7ATnFDjcgUnMw6VoKuRA0
'
//config.headers['Authorization'] = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbk5hbWUiOiIxNTcxMTEzOTg5NSIsInVpZCI6NTI4MjgsImNoYW5uZWxJZCI6MCwiZXhwIjoxNjE5N
zQ4NzcxLCJpc3MiOiJnaW4tYmxvZyJ9.sAefBY0yvwxkQN3f6VjiYZellZasfLs7oRLGFi83BBA
'
return
config
},
error
=>
{
console
.
log
(
"25reject"
);
...
...
@@ -30,19 +30,36 @@ service.interceptors.request.use(config => {
service
.
interceptors
.
response
.
use
(
res
=>
{
// 未设置状态码则默认成功状态
const
code
=
res
.
data
.
code
||
200
;
// 返回所有数据的统一处理
const
data
=
res
.
data
;
// 获取错误信息
const
message
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
'default'
]
if
(
code
===
401
||
code
==
99999
)
{
MessageBox
.
confirm
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
const
message
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
'default'
];
// 200,1意味着成功返回数据
if
(
code
===
200
||
code
===
1
)
{
if
(
res
.
data
)
{
return
res
.
data
}
else
{
if
(
message
)
{
Message
({
message
:
message
,
type
:
'error'
});
}
else
{
Message
({
message
:
'后台数据出错了!'
,
type
:
'error'
});
}
return
Promise
.
reject
(
'error'
);
}
}
else
if
(
code
===
500
)
{
Message
({
message
:
message
,
type
:
'error'
})
return
Promise
.
reject
(
new
Error
(
message
));
}
else
if
(
code
===
401
||
code
==
99999
)
{
MessageBox
.
confirm
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
confirmButtonText
:
'重新登录'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
}).
then
(()
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
...
...
@@ -86,7 +103,7 @@ service.interceptors.response.use(res => {
message
:
message
,
type
:
"error"
});
//
console.log(message);
console
.
log
(
message
);
// --- end ---- 开发时候用这段,把错误彻底抛出来 --- end ---
// --- start --- 正式上线,隐藏报错信息 ----- start ----
...
...
@@ -101,6 +118,7 @@ service.interceptors.response.use(res => {
// }, 1000);
// --- end --- 正式上线,隐藏报错信息 ----- end ----
return
Promise
.
reject
(
error
)
}
)
...
...
src/views/entry/fillBrandInf.vue
浏览文件 @
b2d86fab
...
...
@@ -487,8 +487,8 @@
//this.resetForm();
getBrandsInf
().
then
(
res
=>
{
console
.
log
(
"获取品牌:"
,
res
);
if
(
res
.
code
===
1
&&
res
.
data
)
{
this
.
brandForm
=
res
.
data
[
0
];
if
(
res
.
code
===
1
&&
res
.
data
.
data
)
{
this
.
brandForm
=
res
.
data
.
data
[
0
];
// 商标logo图片处理
let
brandList
=
{};
let
brandArr
=
[];
...
...
src/views/system/asset/balance/index.vue
浏览文件 @
b2d86fab
...
...
@@ -7,7 +7,7 @@
<el-table
v-loading=
"loading"
:height=
"tableHeight"
:data=
"assetList"
>
<el-table-column
label=
"ID"
align=
"center"
prop=
"Id"
/>
<el-table-column
label=
"流水订单号"
align=
"center"
prop=
"BalanceSn"
/>
<el-table-column
label=
"变动金额"
align=
"center"
:formatter=
"formatMoney"
prop=
"ChangeMoney"
/>
<el-table-column
label=
"变动金额"
align=
"center"
prop=
"ChangeMoney"
/>
<el-table-column
label=
"变动类型"
align=
"center"
:formatter=
"formatType"
prop=
"ChangeType"
/>
<el-table-column
label=
"时间"
align=
"center"
:formatter=
"formatTime"
prop=
"AddTime"
/>
<el-table-column
label=
"描述"
align=
"center"
prop=
"Des"
/>
...
...
src/views/system/asset/bankcard/index.vue
浏览文件 @
b2d86fab
...
...
@@ -5,7 +5,7 @@
<span>
账户管理
</span>
<el-button
style=
'float:right'
:disabled=
"
!a
ddbank"
:disabled=
"
isA
ddbank"
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
...
...
@@ -165,7 +165,7 @@
banktitle
:
"对公账户(数量最多为3个)"
,
// 是否显示弹出层
open
:
false
,
a
ddbank
:
false
,
isA
ddbank
:
false
,
bank
:
false
,
zfb
:
false
,
// 查询参数
...
...
@@ -245,8 +245,10 @@
this
.
bankcardList
=
response
.
data
.
list
;
//console.log(this.bankcardList)
this
.
total
=
response
.
data
.
total
;
if
(
this
.
total
<
3
)
{
this
.
addbank
=
true
if
(
this
.
total
>=
3
)
{
this
.
isAddbank
=
true
;
}
else
{
this
.
isAddbank
=
false
;
}
this
.
loading
=
false
;
});
...
...
src/views/system/freight/freight_list/index.vue
浏览文件 @
b2d86fab
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
提现记录
</span>
<span>
运费模板
</span>
<el-button
style=
"float:right;margin-left: 10px;"
...
...
@@ -13,15 +13,15 @@
@
click=
"handleDelete"
>
删除
</el-button>
<el-button
style=
"float:right;"
type=
"success"
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
>
修改
</el-button
>
<!--
<el-button-->
<!-- style="float:right;"-->
<!-- type="success"-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- >修改-->
<!--
</el-button>
--
>
<el-button
style=
"float:right;margin-left: 20px;"
type=
"primary"
...
...
@@ -35,13 +35,11 @@
<el-table
v-loading=
"loading"
:data=
"freightList"
:height=
"tableHeight"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"ID"
align=
"center"
prop=
"Id"
/>
<el-table-column
label=
"模板名称"
align=
"center"
prop=
"Name"
/>
<el-table-column
label=
"排序"
align=
"center"
prop=
"Sort"
/>
<el-table-column
label=
"是否是默认模板"
align=
"center"
:formatter=
"formatDefault"
prop=
"IsDefault"
/>
<el-table-column
label=
"类型"
align=
"center"
:formatter=
"formatType"
prop=
"ChargeType"
/>
<el-table-column
label=
"是否是默认"
align=
"center"
prop=
"Publish"
/>
<el-table-column
label=
"启用状态"
align=
"center"
:formatter=
"formaStatus"
prop=
"Publish"
/>
<el-table-column
label=
"创建时间"
align=
"center"
:formatter=
"formatTime"
prop=
"Created"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
...
...
@@ -70,8 +68,8 @@
@
pagination=
"getList"
/>
<!-- 添加或修改freight对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"
open"
v-if=
"open"
width=
"90%"
append-to-body
>
<IndexBtn
:option=
"form"
/>
<el-dialog
:title=
"title"
:visible
.
sync=
"
isOpen"
v-if=
"isOpen"
width=
"70%"
>
<IndexBtn
:option=
"form"
@
closeIndexbtn=
"closeDialog"
/>
</el-dialog>
</el-card>
</div>
...
...
@@ -104,7 +102,7 @@
// 弹出层标题
title
:
""
,
// 是否显示弹出层
o
pen
:
false
,
isO
pen
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -142,11 +140,26 @@
},
watch
:
{
fullHeight
(
val
,
oldval
)
{
console
.
log
(
val
)
this
.
tableHeight
=
val
-
130
}
},
methods
:
{
closeDialog
(
val
)
{
this
.
isOpen
=
val
;
this
.
getList
();
},
// 模板是否启用状态
formaStatus
(
row
)
{
let
isPublish
=
row
.
Publish
;
let
publish
=
''
;
if
(
isPublish
===
1
)
{
publish
=
'启用'
;
}
if
(
isPublish
===
0
)
{
publish
=
'禁用'
;
}
return
publish
},
formatType
(
row
)
{
var
typese
=
row
.
ChargeType
var
optDess
=
''
...
...
@@ -188,7 +201,7 @@
},
// 取消按钮
cancel
()
{
this
.
o
pen
=
false
;
this
.
isO
pen
=
false
;
this
.
reset
();
},
// 表单重置
...
...
@@ -220,14 +233,18 @@
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
i
d
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
I
d
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
if
(
this
.
total
>=
20
)
{
this
.
$message
({
message
:
'您已经有20个运费模板了,暂时不再支持更多哦!'
,
type
:
'warning'
});
return
;
}
this
.
reset
();
this
.
o
pen
=
true
;
this
.
isO
pen
=
true
;
this
.
form
=
{
Id
:
0
,
Sort
:
0
,
...
...
@@ -245,19 +262,18 @@
],
Disdispatching
:
""
,
Publish
:
0
,
}
,
}
;
this
.
title
=
"添加运费模板"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
console
.
log
(
row
)
this
.
reset
();
const
id
=
row
.
Id
getFreight
(
id
).
then
(
response
=>
{
let
formdate
=
response
.
data
response
.
data
.
Dispatching
=
JSON
.
parse
(
formdate
.
Dispatching
)
this
.
form
=
response
.
data
this
.
o
pen
=
true
;
this
.
isO
pen
=
true
;
this
.
title
=
"修改运费模板"
;
});
},
...
...
@@ -269,7 +285,7 @@
updateFreight
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
this
.
msgSuccess
(
"修改成功"
);
this
.
o
pen
=
false
;
this
.
isO
pen
=
false
;
this
.
getList
();
}
});
...
...
@@ -277,7 +293,7 @@
addFreight
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
this
.
msgSuccess
(
"新增成功"
);
this
.
o
pen
=
false
;
this
.
isO
pen
=
false
;
this
.
getList
();
}
});
...
...
@@ -285,10 +301,12 @@
}
});
},
/*
* publish 启用禁用状态 1是启用,0 禁用
* */
/** 删除按钮操作 */
handleDelete
(
row
)
{
console
.
log
(
row
)
const
ids
=
row
.
Id
const
ids
=
row
.
Id
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除运费模板编号为"'
+
ids
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
...
...
@@ -298,8 +316,7 @@
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}).
catch
(
function
()
{
});
}).
catch
(
function
()
{});
},
}
//methods结束
};
...
...
src/views/system/freight/freight_list/indexbtn.vue
浏览文件 @
b2d86fab
...
...
@@ -105,7 +105,6 @@
</el-row>
</el-form-item>
<el-form-item
label=
"不配送区域"
>
<p>
<el-input
v-model=
"goodsDate.Disdispatching"
placeholder=
""
...
...
@@ -118,7 +117,6 @@
>
</
template
>
</el-input>
</p>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"goodsDate.Publish"
>
...
...
@@ -126,13 +124,11 @@
<el-radio
:label=
"0"
>
禁用
</el-radio>
</el-radio-group>
</el-form-item>
<el-button
class=
"btns"
type=
"primary"
@
click=
"handleinfomationclick()"
>
提交
</el-button
<el-button
class=
"btns"
type=
"primary"
@
click=
"handleinfomationclick()"
>
提
交
</el-button
>
</el-form>
<el-dialog
title=
"提示"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-dialog
title=
"选择不配送省"
:visible
.
sync=
"dialogVisible"
width=
"30%"
append-to-body
>
<div>
<el-checkbox-group
v-model=
"checkList"
>
<el-checkbox
...
...
@@ -145,9 +141,7 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"btndisabled()"
>
确 定
</el-button
>
<el-button
type=
"primary"
@
click=
"btndisabled()"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -247,22 +241,19 @@ export default {
},
opendias
(
type
,
i
,
index
)
{
let
_this
=
this
this
.
goodsDate
.
Dispatching
.
forEach
((
element
)
=>
{
//获取初始化数据已选中
this
.
goodsDate
.
Dispatching
.
forEach
((
element
)
=>
{
let
arrd
=
element
.
a
.
split
(
','
)
for
(
let
i
=
0
;
i
<
arrd
.
length
;
i
++
){
this
.
disabledate
.
push
(
arrd
[
i
]);
}
});
let
arr
=
this
.
goodsDate
.
Disdispatching
.
split
(
','
)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
//获取初始化数据不配送
let
arr
=
this
.
goodsDate
.
Disdispatching
.
split
(
','
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
){
this
.
disabledate
.
push
(
arr
[
i
]);
}
this
.
btnindex
=
index
this
.
btnindex
=
index
;
this
.
arrlist
.
forEach
(
item
=>
{
item
.
value
=
false
item
.
value
=
false
;
})
this
.
checkList
=
type
.
split
(
","
);
...
...
@@ -274,27 +265,19 @@ export default {
}
})
console
.
log
(
disabarr
)
// 区域选择
if
(
i
==
0
)
{
//配送区域
}
else
{
//不配送区域
}
this
.
dialogVisible
=
true
;
},
handleinfomationclick
()
{
//提交
console
.
log
(
this
.
goodsDate
)
this
.
goodsDate
.
Disdispatching
.
forEach
(
item
=>
{
item
.
np
=
Number
(
item
.
np
*
100
).
toFixed
()
})
addFreight
(
this
.
goodsDate
).
then
(
response
=>
{
if
(
response
.
data
.
code
==
1
){
alert
(
response
.
data
.
msg
);
console
.
log
(
296
,
response
);
if
(
response
.
data
.
code
===
1
)
{
this
.
$message
({
message
:
'新增成功!'
,
type
:
'success'
});
this
.
$emit
(
"closeIndexbtn"
,
false
);
}
this
.
loading
=
false
;
});
},
...
...
@@ -372,7 +355,7 @@ li {
border-bottom
:
1px
solid
#e6ebf5
;
}
.btns
{
width
:
50
0px
;
width
:
18
0px
;
margin
:
0
auto
;
display
:
block
;
}
...
...
src/views/system/goods/onsale/index.vue
浏览文件 @
b2d86fab
...
...
@@ -18,10 +18,18 @@
type=
"success"
icon=
"el-icon-edit"
size=
"mini"
@
click=
"handleOnsale"
>
修改
</el-button>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
icon=
""
size=
"mini"
@
click=
"handleOffGoods"
>
商品下架
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
...
...
@@ -100,7 +108,7 @@
</template>
<
script
>
import
IndexBtn
from
'../add'
import
{
listGoods
,
getGoods
,
delGoods
,
addGoods
,
updateGoods
}
from
'@/api/module/goods'
import
{
listGoods
,
getGoods
,
delGoods
,
addGoods
,
updateGoods
,
Onsale
}
from
'@/api/module/goods'
export
default
{
name
:
"goods"
,
data
()
{
...
...
@@ -156,6 +164,25 @@ export default {
}
},
methods
:
{
/*商品下架*/
handleOffGoods
(
row
)
{
const
rowIds
=
row
.
roleId
||
this
.
ids
;
let
params
=
{
"ids"
:
rowIds
,
"status"
:
0
};
if
(
!
rowIds
||
rowIds
.
length
===
0
)
{
this
.
$message
({
message
:
'请先选择要下架的商品数据'
,
type
:
'warning'
});
return
;
}
this
.
$confirm
(
'是否确认下架商品ID为"'
+
rowIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
Onsale
(
params
);
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"下架成功"
);
})
},
//格式化价格
formatePrice
(
row
,
s
,
value
,
i
){
var
nm
=
0
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论