Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
d0a9c9a9
提交
d0a9c9a9
authored
9月 17, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提现接口,和售后bug修复
上级
09a910fa
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
152 行增加
和
153 行删除
+152
-153
bankcard.js
src/api/module/bankcard.js
+9
-0
index.vue
src/views/system/asset/myAsset/index.vue
+63
-31
index.vue
src/views/system/asset/withdraw/index.vue
+74
-116
index.vue
src/views/system/retreat/retreat/index.vue
+6
-6
没有找到文件。
src/api/module/bankcard.js
浏览文件 @
d0a9c9a9
...
...
@@ -71,6 +71,15 @@ export function addBankcardData(data) {
})
}
// 编辑 银行卡 信息
export
function
editBankcardData
(
data
)
{
return
request
({
url
:
'/system/bank/update'
,
method
:
'post'
,
data
:
data
})
}
// 获取 银行卡 详情
export
function
getBankDetailsData
(
data
)
{
return
request
({
...
...
src/views/system/asset/myAsset/index.vue
浏览文件 @
d0a9c9a9
...
...
@@ -78,6 +78,7 @@
<el-dialog
:title=
"bankcardTitle"
:visible
.
sync=
"addBankcardInfoDialog"
:before-close=
"cancelSubmitBankcard"
center
>
<el-form
ref=
"bankcardForm"
:model=
"bankcardForm"
:rules=
"bankcardRule"
size=
"small"
label-width=
"180px"
>
...
...
@@ -89,7 +90,7 @@
</el-form-item>
<el-form-item
label=
"银行名称:"
prop=
"bank_name"
>
<el-select
v-model=
"bankcardForm.bank_name"
placeholder=
"请选择"
style=
"width: 70%;"
>
<el-select
v-model=
"bankcardForm.bank_name"
placeholder=
"请选择"
style=
"width: 70%;"
ref=
"bankSelect"
>
<el-option
v-for=
"item in bankOptions"
:key=
"item.code"
...
...
@@ -99,7 +100,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"对公账户名称:"
style=
"width:100%"
>
<el-form-item
label=
"对公账户名称:"
style=
"width:100%"
prop=
"bankAccountName"
>
<el-input
v-model=
"bankcardForm.bankAccountName"
placeholder=
"对公账户名称,不能输入和修改"
:disabled=
"true"
style=
"width: 70%"
></el-input>
<p
class=
"withdraw-tip"
>
银行卡必须为对公账户,且与提交的公司名称相一致,不允许修改
...
...
@@ -129,7 +130,7 @@
</
template
>
<
script
>
import
{
getMyAssetListData
,
getOrganizationData
,
getBankDetailsData
,
getBankcardListData
,
addBankcardData
,
delBankcardData
}
from
'@/api/module/bankcard'
import
{
getMyAssetListData
,
getOrganizationData
,
getBankDetailsData
,
getBankcardListData
,
addBankcardData
,
editBankcardData
,
delBankcardData
}
from
'@/api/module/bankcard'
export
default
{
name
:
"Index"
,
data
()
{
...
...
@@ -141,6 +142,7 @@
bankcardList
:
[],
addBankcardInfoDialog
:
false
,
bankcardTitle
:
''
,
bankAccountName
:
''
,
// 主体信息 公司名称
bankcardForm
:
{
bank_name
:
''
,
bankAccountName
:
''
,
...
...
@@ -149,10 +151,12 @@
},
bankcardRule
:
{
bank_name
:
[{
required
:
true
,
message
:
'银行名称不能为空'
,
trigger
:
'change'
}],
bankAccountName
:
[{
required
:
true
,
message
:
'对公账户不能为空'
,
trigger
:
'change'
}],
bank_branch_name
:
[{
required
:
true
,
message
:
'开户行支行不能为空'
,
trigger
:
'blur'
}],
bank_account_sn
:
[{
required
:
true
,
message
:
'银行账号不能为空'
,
trigger
:
'blur'
}]
},
bankOptions
:
[],
// 银行卡列表
indexId
:
0
,
}
// return end
},
// data end
created
()
{
...
...
@@ -163,10 +167,10 @@
/** 获取 银行卡列表 */
this
.
getBankcardList
()
/** 获取主体信息 */
//
this.getOrganization();
this
.
getOrganization
();
},
methods
:
{
/**
获取 账户银行卡列表
*/
/**
我的资产 所有数据
*/
getMyAssetList
()
{
getMyAssetListData
(
{
seller_id
:
this
.
seller_id
}
).
then
(
res
=>
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
...
...
@@ -190,17 +194,23 @@
/** 获取主体信息 */
getOrganization
()
{
getOrganizationData
().
then
(
res
=>
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
this
.
bankAccountName
=
res
.
data
.
organization_name
;
}
});
},
/** 编辑 银行卡信息 */
editBankcard
(
id
)
{
this
.
bankcardTitle
=
'编辑账户'
// console.log("编辑",id)
;
this
.
indexId
=
id
;
getBankDetailsData
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
this
.
addBankcardInfoDialog
=
true
;
this
.
bankcardForm
.
bank_name
=
res
.
data
.
bank_name
;
this
.
bankcardForm
.
bankAccountName
=
res
.
data
.
corporate_account_name
;
this
.
bankcardForm
.
bank_branch_name
=
res
.
data
.
bank_branch_name
;
this
.
bankcardForm
.
bank_account_sn
=
res
.
data
.
bank_account_sn
;
}
else
{
let
msg
=
res
.
message
?
res
.
message
:
'获取银行卡信息失败'
this
.
$message
({
type
:
'error'
,
message
:
msg
});
...
...
@@ -231,41 +241,57 @@
/** 添加 银行卡信息 */
addBankcard
()
{
// this.resetAddBankcardForm();
this
.
bankcardTitle
=
'添加账户'
this
.
bankcardForm
.
bankAccountName
=
this
.
bankAccountName
this
.
addBankcardInfoDialog
=
true
;
this
.
indexId
=
0
;
},
/** 提交 添加银行卡信息 */
submitBankcard
()
{
let
params
=
{
seller_id
:
''
,
bank_name
:
''
,
bank_branch_name
:
''
,
bank_account_sn
:
''
bank_branch_name
:
this
.
bankcardForm
.
bank_branch_name
,
bank_account_sn
:
this
.
bankcardForm
.
bank_account_sn
}
this
.
$refs
.
bankcardForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
params
.
seller_id
=
this
.
seller_id
;
// params.bank_name = this.bankcardForm.express_name;
// params.bank_branch_name = this.bankcardForm.express_sn;
// params.bank_account_sn = this.bankcardForm
for
(
let
i
=
0
;
i
<
this
.
bankOptions
.
length
;
i
++
)
{
if
(
this
.
bankcardForm
.
bank_name
==
this
.
bankOptions
[
i
].
code
)
{
params
.
bank_name
=
this
.
bankOptions
[
i
].
name
break
}
}
this
.
$refs
.
bankcardForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 新增
if
(
this
.
indexId
==
0
)
{
params
[
'seller_id'
]
=
this
.
seller_id
;
addBankcardData
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功'
});
this
.
addBankcardInfoDialog
=
false
;
this
.
resetAddInvoiceForm
();
this
.
resetAddBankcardForm
();
this
.
getMyAssetList
();
// 更新数据
}
else
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
?
res
.
message
:
'新增失败'
});
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
?
res
.
message
:
'新增失败'
});
}
});
}
else
{
params
[
'id'
]
=
this
.
indexId
editBankcardData
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功'
});
this
.
addBankcardInfoDialog
=
false
;
this
.
resetAddBankcardForm
();
this
.
getMyAssetList
();
// 更新数据
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
?
res
.
message
:
'修改失败'
});
}
});
}
}
// valid end
});
},
...
...
@@ -273,6 +299,12 @@
/** 取消 提交 添加银行卡信息*/
cancelSubmitBankcard
()
{
this
.
addBankcardInfoDialog
=
false
;
this
.
resetAddBankcardForm
();
},
/** 初始化 添加 银行卡 数据 */
resetAddBankcardForm
()
{
this
.
$refs
[
'bankcardForm'
].
resetFields
();
},
/** 提现 操作 */
...
...
src/views/system/asset/withdraw/index.vue
浏览文件 @
d0a9c9a9
...
...
@@ -5,56 +5,47 @@
<span
class=
"blue-block blue-block-goods-title"
></span>
操作提现
</div>
<el-form
ref=
"
form"
:model=
"f
orm"
size=
"small"
:rules=
"rules"
label-width=
"150px"
class=
"ruleFormshop"
>
<el-form
ref=
"
assetForm"
:model=
"assetF
orm"
size=
"small"
:rules=
"rules"
label-width=
"150px"
class=
"ruleFormshop"
>
<el-form-item
label=
"当前余额:"
>
{{
sellerinfo
.
Balance
}}
元
{{
currentBalance
}}
元
</el-form-item>
<el-form-item
label=
"可提现金额:"
>
{{
drawableCash
}}
元
{{
withdrawalBalance
}}
元
</el-form-item>
<el-form-item
label=
"提现中的金额:"
>
{{
sellerinfo
.
FrozenMoney
}}
元
{{
withdrawalProgress
}}
元
</el-form-item>
<!--
<el-form-item
label=
"手续费:"
>
-->
<!-- 当前手续费为
{{
newFee
}}
元-->
<!--
</el-form-item>
-->
<el-form-item
label=
"提现至:"
prop=
"bank_id"
>
<el-select
v-model=
"form.bank_id"
placeholder=
"选择到账银行卡"
style=
"width:420px;"
>
<el-option
v-for=
"item in banklist"
:key=
"item.Id"
:label=
"item.bank_name ? item.bank_name : item.bank_account_name"
:value=
"item.id"
></el-option>
<el-select
v-model=
"assetForm.bank_id"
placeholder=
"选择到账银行卡"
style=
"width:420px;"
>
<el-option
v-for=
"item in bankList"
:key=
"item.id"
:label=
"item.bank_name"
:value=
"item.id"
></el-option>
</el-select>
<
p
class=
"withdraw-tip"
>
您还没有账户,
<span>
去添加
</span>
</
p
>
<
span
class=
"withdraw-tip"
>
您还没有账户,
<span>
去添加
>>
</span>
</
span
>
</el-form-item>
<el-form-item
label=
"提现金额:"
prop=
"amount"
>
<el-input
v-model=
"form.amount"
@
blur=
"onInputBlur($event)"
placeholder=
"提现金额大于等于100"
style=
"width:420px;"
/>
<p
class=
"withdraw-tip"
>
不允许手动输入,提现金额必须为全部的可提现余额,
<br/>
<el-form-item
label=
"提现金额:"
>
<el-input
v-model=
"withdrawalBalance"
disabled
placeholder=
"全部提现金额"
style=
"width:420px;"
/>
<span
class=
"withdraw-tip"
>
不允许手动输入,提现金额必须为全部的可提现余额,
手续费将从您的提现金额中扣除,以实际到账为准(开票以实际到账金额开具)
</
p
>
</
span
>
</el-form-item>
<el-form-item
label=
"支付密码:"
prop=
"p
wd
"
>
<el-input
v-model=
"
form.pwd
"
type=
"password"
placeholder=
"请输入提现密码"
style=
"width:420px;"
/>
<
p
class=
"withdraw-tip"
>
<el-form-item
label=
"支付密码:"
prop=
"p
ay_pass
"
>
<el-input
v-model=
"
assetForm.pay_pass
"
type=
"password"
placeholder=
"请输入提现密码"
style=
"width:420px;"
/>
<
span
class=
"withdraw-tip"
>
忘记支付密码?重新设定
</
p
>
</
span
>
</el-form-item>
<el-form-item
label=
"短信验证码:"
prop=
"
verify
code"
class=
"spe-code-con-item"
>
<el-input
v-model=
"
form.verify
code"
placeholder=
"验证码"
style=
"width:420px;"
>
<el-form-item
label=
"短信验证码:"
prop=
"code"
class=
"spe-code-con-item"
>
<el-input
v-model=
"
assetForm.
code"
placeholder=
"验证码"
style=
"width:420px;"
>
<template
slot=
"append"
>
<span
v-show=
"show"
@
click=
"getCheckCode
Fn
"
>
获取验证码
</span>
<span
v-show=
"show"
@
click=
"getCheckCode"
>
获取验证码
</span>
<span
v-show=
"!show"
class=
"count"
>
{{
count
}}
s
</span>
</
template
>
</el-input>
...
...
@@ -64,13 +55,14 @@
<div
class=
"footer-btn"
>
<el-button
type=
"primary"
@
click=
"submitForm"
:disabled=
"inSureCashOut"
style=
"margin-right:20px;"
>
确 定
</el-button>
<el-button
@
click=
"
cancel
"
>
取 消
</el-button>
<el-button
@
click=
"
resetAssetForm
"
>
取 消
</el-button>
</div>
</el-card>
</div>
</template>
<
script
>
import
{
getSellerInfo
,
getBankcardList
,
addWithdrawlog
,
getCheckCode
}
from
'@/api/module/withdrawlog'
// import {getSellerInfo, getBankcardList, addWithdrawlog, getCheckCode} from '@/api/module/withdrawlog'
import
{
getMyAssetListData
}
from
'@/api/module/bankcard'
export
default
{
name
:
"withdrawlog"
,
...
...
@@ -81,43 +73,53 @@
inSureCashOut
:
false
,
count
:
''
,
timer
:
null
,
//提现金额
amount
:
0
,
// 遮罩层
loading
:
true
,
// 选中数组
sellerId
:
0
,
sellerinfo
:
{},
banklist
:
[],
//手续费
newFee
:
0
,
// 可提现金额
drawableCash
:
0
,
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
true
,
// 表单参数
form
:
{
seller_id
:
0
,
currentBalance
:
0
,
withdrawalBalance
:
0
,
withdrawalProgress
:
0
,
bankList
:
[],
assetForm
:
{
bank_id
:
''
,
amount
:
''
pay_pass
:
''
,
code
:
''
},
// 表单校验
rules
:
{
bank_id
:
[{
required
:
true
,
message
:
"请选择要提现的银行卡"
,
trigger
:
"change"
}],
amount
:
[{
required
:
true
,
message
:
"提现金额不能为空"
,
trigger
:
"blur"
}],
verifycode
:
[{
required
:
true
,
message
:
"短信验证码不能为空"
,
trigger
:
"blur"
}],
pwd
:
[{
required
:
true
,
message
:
"支付密码必须填写"
,
trigger
:
"blur"
}]
}
code
:
[{
required
:
true
,
message
:
"短信验证码不能为空"
,
trigger
:
"blur"
}],
pay_pass
:
[{
required
:
true
,
message
:
"支付密码必须填写"
,
trigger
:
"blur"
}]
},
};
},
watch
:
{},
created
()
{
this
.
sellerId
=
this
.
$store
.
state
.
user
.
sellerid
;
this
.
getList
();
/** 唯一 商家 id */
this
.
seller_id
=
this
.
$store
.
state
.
user
.
sellerid
;
/** 我的资产 所有数据 */
this
.
getMyAssetList
()
},
methods
:
{
//-----------
/** 我的资产 所有数据 */
getMyAssetList
()
{
getMyAssetListData
(
{
seller_id
:
this
.
seller_id
}
).
then
(
res
=>
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
// 账号资产
if
(
res
.
data
.
account_info
)
{
this
.
withdrawalBalance
=
Number
(
res
.
data
.
account_info
.
new_balance
)
/
100
;
this
.
withdrawalProgress
=
Number
(
res
.
data
.
account_info
.
new_frozen_money
)
/
100
;
this
.
currentBalance
=
this
.
add
(
this
.
withdrawalBalance
,
this
.
withdrawalProgress
);
}
// 账户管理
if
(
res
.
data
.
bank_list
)
{
this
.
bankList
=
res
.
data
.
bank_list
;
}
}
else
{
let
msg
=
res
.
message
?
res
.
message
:
'获取数据失败'
this
.
$message
({
type
:
'error'
,
message
:
msg
});
}
});
},
// 自定义高精度浮点数运算
// 加法
add
(
arg1
,
arg2
)
{
...
...
@@ -158,41 +160,24 @@
},
1000
)
}
},
getCheckCodeFn
()
{
/** 获取 短信验证码 */
getCheckCode
()
{
let
numRegExp
=
/^
[
0-9
]
+
(
.
[
0-9
]{2})?
$/
;
let
numberMoney
=
Number
(
this
.
form
.
amount
);
let
numberCash
=
Number
(
this
.
drawableCash
);
if
(
this
.
form
.
bank_id
===
''
)
{
this
.
$refs
.
form
.
validateField
(
"bank_id"
);
return
;
}
if
(
this
.
form
.
amount
===
''
)
{
this
.
$refs
.
form
.
validateField
(
"amount"
);
return
;
}
if
(
!
numRegExp
.
test
(
this
.
form
.
amount
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'提现金额只能输入大于 0 的数字'
});
return
;
}
if
(
numberMoney
>
numberCash
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'提现金额不足'
});
return
;
}
else
if
(
numberMoney
<
100
)
{
this
.
msgError
(
"提现金额必须大于等于100"
);
if
(
this
.
assetForm
.
bank_id
===
''
)
{
this
.
$refs
.
assetForm
.
validateField
(
"bank_id"
);
return
;
}
if
(
this
.
seller
I
d
<=
0
)
{
if
(
this
.
seller
_i
d
<=
0
)
{
this
.
msgError
(
"商户信息错误"
);
return
;
}
// 倒计时效果
this
.
getCode
()
getCheckCode
({
sellerId
:
this
.
sellerId
}).
then
(
response
=>
{
getCheckCode
({
seller_id
:
this
.
seller_id
}).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
msgSuccess
(
response
.
msg
);
}
...
...
@@ -200,6 +185,7 @@
},
// 暂时 无用
onInputBlur
(
event
)
{
let
fee
=
0.006
;
this
.
form
.
amount
=
event
.
target
.
value
;
...
...
@@ -225,38 +211,10 @@
this
.
newFee
=
(
this
.
form
.
amount
*
fee
+
1
).
toFixed
(
2
);
}
},
//获取商户的信息
getSellerInfoFn
()
{
const
sellerid
=
this
.
sellerId
;
getSellerInfo
({
sellerId
:
sellerid
}).
then
(
response
=>
{
this
.
sellerinfo
=
response
.
data
;
this
.
sellerinfo
.
Balance
=
response
.
data
.
Balance
/
100
;
this
.
sellerinfo
.
FrozenMoney
=
response
.
data
.
FrozenMoney
/
100
;
this
.
drawableCash
=
this
.
minus
(
this
.
sellerinfo
.
Balance
,
this
.
sellerinfo
.
FrozenMoney
);
});
},
//获取商户的银行卡列表
getBankcardList
()
{
getBankcardList
({
sellerId
:
this
.
sellerId
}).
then
(
response
=>
{
this
.
banklist
=
response
.
data
.
data
;
//debugger
});
},
/** 查询商户提现列表 */
getList
()
{
this
.
getSellerInfoFn
();
this
.
getBankcardList
();
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{};
this
.
resetForm
(
"form"
);
resetAssetForm
()
{
this
.
$refs
[
'assetForm'
].
resetFields
();
},
/** 提交按钮 */
...
...
@@ -273,9 +231,9 @@
let
feeAddAmount
=
this
.
add
(
numberFee
,
numberMoney
);
let
isabled
=
Number
(
this
.
minus
(
numberCash
,
feeAddAmount
)
);
this
.
form
.
seller
Id
=
this
.
sellerI
d
;
this
.
form
.
seller
_id
=
this
.
seller_i
d
;
// 再次校验 提现信息
if
(
!
this
.
form
.
seller
I
d
)
{
if
(
!
this
.
form
.
seller
_i
d
)
{
this
.
$message
({
type
:
'error'
,
message
:
'商户信息有误!'
});
return
;
}
...
...
@@ -302,7 +260,7 @@
addWithdrawlog
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
1
)
{
this
.
msgSuccess
(
response
.
message
);
this
.
getList
();
//
this.getList();
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
response
.
message
});
...
...
src/views/system/retreat/retreat/index.vue
浏览文件 @
d0a9c9a9
...
...
@@ -46,9 +46,9 @@
</el-select>
</el-form-item>
<el-form-item
label=
"订单号"
prop=
"
goods_order
_sn"
>
<el-form-item
label=
"订单号"
prop=
"
refund
_sn"
>
<el-input
v-model=
"queryParams.
goods_order
_sn"
v-model=
"queryParams.
refund
_sn"
placeholder=
"请输入订单号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
...
...
@@ -70,7 +70,7 @@
<el-table
class=
"after-sale-table"
:data=
"afterSaleList"
:height=
"afterSaleHeight"
>
<el-table-column
label=
"商品ID"
align=
"center"
width=
"150"
prop=
"goodsId"
></el-table-column>
<el-table-column
label=
"商品名称"
align=
"center"
width=
"180"
prop=
"title"
></el-table-column>
<el-table-column
label=
"订单号"
align=
"center"
width=
"240"
prop=
"
goods_order
_sn"
></el-table-column>
<el-table-column
label=
"订单号"
align=
"center"
width=
"240"
prop=
"
refund
_sn"
></el-table-column>
<el-table-column
label=
"退换货类型"
align=
"center"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.refund_type == 1"
>
仅退款
</span>
...
...
@@ -131,7 +131,7 @@
goods_id
:
''
,
goods_title
:
''
,
refund_type
:
''
,
goods_order
_sn
:
''
,
refund
_sn
:
''
,
reason
:
''
,
},
pickerOptions
:
{
...
...
@@ -241,7 +241,7 @@
goods_id
:
this
.
queryParams
.
goods_id
,
goods_title
:
this
.
queryParams
.
goods_title
,
refund_type
:
''
,
goods_order
_sn
:
''
,
refund
_sn
:
''
,
reason
:
''
}
// console.log('queryParams:',this.queryParams);
...
...
@@ -308,7 +308,7 @@
goods_id
:
''
,
goods_title
:
''
,
refund_type
:
''
,
goods_order
_sn
:
''
,
refund
_sn
:
''
,
reason
:
''
,
}
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论