Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_admin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_admin
Commits
07f59c99
Commit
07f59c99
authored
Dec 26, 2023
by
yaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加用户凭证弹窗功能
parent
7a990755
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
250 additions
and
32 deletions
+250
-32
src/api/business/consign.js
src/api/business/consign.js
+16
-0
src/views/consign/components/FinishSettlementDialog.vue
src/views/consign/components/FinishSettlementDialog.vue
+200
-0
src/views/consign/consignDetail.vue
src/views/consign/consignDetail.vue
+17
-1
src/views/consign/consignList.vue
src/views/consign/consignList.vue
+17
-31
No files found.
src/api/business/consign.js
View file @
07f59c99
...
@@ -50,3 +50,19 @@ export function confirmReceive(params) {
...
@@ -50,3 +50,19 @@ export function confirmReceive(params) {
data
:
params
data
:
params
})
})
}
}
export
function
finishSettlement
(
params
)
{
return
request
({
url
:
'
/consignSaleManage/finishSettlement
'
,
method
:
'
post
'
,
data
:
params
})
}
export
function
getSettlementInfo
(
params
)
{
return
request
({
url
:
'
/consignSaleManage/getSettlementInfo
'
,
method
:
'
post
'
,
data
:
params
})
}
src/views/consign/components/FinishSettlementDialog.vue
0 → 100644
View file @
07f59c99
<
template
>
<el-dialog
v-if=
"finishDialogShow"
:visible.sync=
"finishDialogShow"
:before-close=
"handleCancelFinishDialog"
width=
"600px"
height=
"800px"
title=
"货品售出"
>
<el-form
ref=
"finish"
:model=
"saleForm"
>
<el-form-item>
<div
v-if=
"saleUserInfo"
class=
"sale_info"
>
{{
`向${saleUserInfo.name || '-'
}
(手机号:${saleUserInfo.phone || '-'
}
)转账${saleUserInfo.settleAmount || '-'
}
元`
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
商品图片
"
>
<
el
-
upload
:
action
=
"
uploadPath
"
:
headers
=
"
headers
"
:
limit
=
"
3
"
:
file
-
list
=
"
itemImages
"
:
on
-
exceed
=
"
uploadOverrun
"
:
on
-
success
=
"
handleGalleryUrl
"
:
on
-
remove
=
"
handleRemove
"
multiple
accept
=
"
.jpg,.jpeg,.png,.gif
"
list
-
type
=
"
picture-card
"
>
<
i
class
=
"
el-icon-plus
"
/>
<
/el-upload
>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
@
click
=
"
handleCancelFinishDialog
"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
handleFinishValue
"
>
确
定
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/template
>
<
script
>
import
{
MessageBox
}
from
'
element-ui
'
import
{
finishSettlement
,
getSettlementInfo
}
from
'
@/api/business/consign
'
import
{
uploadPath
}
from
'
@/api/business/storage
'
import
{
getToken
}
from
'
@/utils/auth
'
export
default
{
name
:
'
FinishSettlementDialog
'
,
props
:
{
finishDialogShow
:
{
type
:
Boolean
,
default
:
false
}
,
saleId
:
{
type
:
String
,
default
:
''
}
}
,
data
()
{
return
{
uploadPath
,
itemImages
:
[],
// 货品售出
saleForm
:
{
images
:
[]
}
,
saleUserInfo
:
{
}
// finishRules:
{
// dealPrice: [
//
{
required
:
true
,
message
:
'
成交金额不能为空
'
,
trigger
:
'
blur
'
}
,
//
{
// pattern: /^[1-9]\d*$/,
// message:
// '格式不正确,请输入正整数!'
//
}
// ],
// remark: [
//
{
required
:
true
,
message
:
'
原因不能为空
'
,
trigger
:
'
blur
'
}
// ]
//
}
}
}
,
computed
:
{
headers
()
{
return
{
'
X-Dts-Admin-Token
'
:
getToken
()
}
}
}
,
created
()
{
this
.
handleGetSettlementInfo
()
}
,
methods
:
{
uploadOverrun
:
function
()
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
上传文件个数超出限制!最多上传3张凭证!
'
}
)
}
,
handleGalleryUrl
(
response
,
file
,
fileList
)
{
if
(
response
.
errno
===
0
)
{
this
.
saleForm
.
images
.
push
(
response
.
data
.
url
)
}
}
,
handleRemove
:
function
(
file
,
fileList
)
{
var
url
if
(
file
.
response
===
undefined
)
{
url
=
file
.
url
}
else
{
url
=
file
.
response
.
data
.
url
}
if
(
url
===
this
.
goods
.
topImage
)
{
this
.
goods
.
topImage
=
''
}
for
(
var
i
=
0
;
i
<
this
.
goods
.
images
.
length
;
i
++
)
{
// 这里存在两种情况
// 1. 如果所删除图片是刚刚上传的图片,那么图片地址是file.response.data.url
// 此时的file.url虽然存在,但是是本机地址,而不是远程地址。
// 2. 如果所删除图片是后台返回的已有图片,那么图片地址是file.url
if
(
url
===
this
.
goods
.
topImage
)
{
this
.
goods
.
topImage
=
''
}
if
(
this
.
goods
.
images
[
i
]
===
url
)
{
this
.
goods
.
images
.
splice
(
i
,
1
)
}
}
}
,
handleCancelFinishDialog
()
{
this
.
$emit
(
'
cancelDialog
'
)
}
,
handleGetSettlementInfo
()
{
if
(
this
.
saleId
)
{
const
params
=
{
credential
:
this
.
saleForm
.
images
.
join
(
'
;
'
),
saleId
:
this
.
saleId
}
getSettlementInfo
(
params
)
.
then
(
response
=>
{
this
.
saleUserInfo
=
response
.
data
.
data
console
.
log
(
'
==凭证信息=
'
,
response
)
}
)
.
catch
(
response
=>
{
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
}
)
}
)
}
}
,
/**
* 实物评估
*/
handleFinishValue
()
{
if
(
!
this
.
saleForm
.
images
||
this
.
saleForm
.
images
.
length
===
0
)
{
this
.
$notify
.
error
({
message
:
'
请上传凭证
'
}
)
return
}
if
(
this
.
saleId
)
{
const
params
=
{
credential
:
this
.
saleForm
.
images
.
join
(
'
;
'
),
saleId
:
this
.
saleId
}
this
.
$refs
.
finish
.
validate
((
valid
)
=>
{
if
(
valid
)
{
finishSettlement
(
params
)
.
then
(
response
=>
{
this
.
$notify
.
success
({
message
:
'
上传成功
'
}
)
this
.
$emit
(
'
refreshList
'
)
this
.
$emit
(
'
cancelDialog
'
)
}
)
.
catch
(
response
=>
{
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
}
)
}
)
}
}
)
}
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
sale_info
{
color
:
rgb
(
81
,
90
,
110
);
font
-
size
:
15
px
;
font
-
weight
:
700
;
}
.
content
{
width
:
100
%
;
text
-
align
:
center
;
}
.
image
{
width
:
400
px
;
height
:
auto
;
}
<
/style
>
src/views/consign/consignDetail.vue
View file @
07f59c99
...
@@ -34,6 +34,12 @@
...
@@ -34,6 +34,12 @@
size=
"mini"
size=
"mini"
@
click=
"finishDialogShow = true"
>
货品售出
@
click=
"finishDialogShow = true"
>
货品售出
</el-button>
</el-button>
<el-button
v-if=
"systemState === 16"
type=
"primary"
size=
"mini"
@
click=
"finishSettlementDialogShow = true"
>
向用户结款
</el-button>
<el-button
<el-button
v-if=
"systemState
<
20
"
v-if=
"systemState
<
20
"
type=
"danger"
type=
"danger"
...
@@ -107,6 +113,13 @@
...
@@ -107,6 +113,13 @@
@
cancelDialog
=
"
finishDialogShow = false
"
@
cancelDialog
=
"
finishDialogShow = false
"
@
refreshList
=
"
handleGetDetail
"
@
refreshList
=
"
handleGetDetail
"
/>
/>
<
FinishSettlementDialog
v
-
if
=
"
finishSettlementDialogShow
"
:
finish
-
dialog
-
show
=
"
finishSettlementDialogShow
"
:
sale
-
id
=
"
saleId
"
@
cancelDialog
=
"
finishSettlementDialogShow = false
"
@
refreshList
=
"
handleGetDetail
"
/>
<
el
-
dialog
<
el
-
dialog
v
-
if
=
"
cancelConsignDialogShow
"
v
-
if
=
"
cancelConsignDialogShow
"
:
visible
.
sync
=
"
cancelConsignDialogShow
"
:
visible
.
sync
=
"
cancelConsignDialogShow
"
...
@@ -156,10 +169,11 @@ import CheckVideoDialog from '../goods/components/CheckVideoDialog'
...
@@ -156,10 +169,11 @@ import CheckVideoDialog from '../goods/components/CheckVideoDialog'
import
IdentifyValueDialog
from
'
./components/IdentifyValueDialog
'
import
IdentifyValueDialog
from
'
./components/IdentifyValueDialog
'
import
ImageValueDialog
from
'
./components/ImageValueDialog
'
import
ImageValueDialog
from
'
./components/ImageValueDialog
'
import
SaleConsignDialog
from
'
./components/SaleConsignDialog
'
import
SaleConsignDialog
from
'
./components/SaleConsignDialog
'
import
FinishSettlementDialog
from
'
./components/FinishSettlementDialog
'
export
default
{
export
default
{
name
:
'
ConsignDetail
'
,
name
:
'
ConsignDetail
'
,
components
:
{
SaleConsignDialog
,
ImageValueDialog
,
IdentifyValueDialog
,
CheckVideoDialog
,
CheckLargeImageDialog
}
,
components
:
{
FinishSettlementDialog
,
SaleConsignDialog
,
ImageValueDialog
,
IdentifyValueDialog
,
CheckVideoDialog
,
CheckLargeImageDialog
}
,
data
()
{
data
()
{
return
{
return
{
saleId
:
''
,
saleId
:
''
,
...
@@ -180,6 +194,8 @@ export default {
...
@@ -180,6 +194,8 @@ export default {
// 货品售出
// 货品售出
finishDialogShow
:
false
,
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
// 取消
cancelForm
:
{
cancelForm
:
{
content
:
''
,
content
:
''
,
...
...
src/views/consign/consignList.vue
View file @
07f59c99
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
v-if=
"scope.row.systemState === 16"
v-if=
"scope.row.systemState === 16"
type=
"primary"
type=
"primary"
size=
"mini"
size=
"mini"
@
click=
"handleFinishDialogShow(scope.row)"
>
向用户结款
@
click=
"handleFinish
Settlement
DialogShow(scope.row)"
>
向用户结款
</el-button>
</el-button>
<el-button
<el-button
v-if=
"scope.row.systemState
<
16
"
v-if=
"scope.row.systemState
<
16
"
...
@@ -132,6 +132,7 @@
...
@@ -132,6 +132,7 @@
@
cancelIdentifyDialog=
"identifyValueDialogShow = false"
@
cancelIdentifyDialog=
"identifyValueDialogShow = false"
@
refreshList=
"getList"
@
refreshList=
"getList"
/>
/>
<!--货品售出-->
<SaleConsignDialog
<SaleConsignDialog
v-if=
"finishDialogShow"
v-if=
"finishDialogShow"
:sale-id=
"currentSaleId"
:sale-id=
"currentSaleId"
...
@@ -139,6 +140,14 @@
...
@@ -139,6 +140,14 @@
@
cancelDialog=
"finishDialogShow = false"
@
cancelDialog=
"finishDialogShow = false"
@
refreshList=
"getList"
@
refreshList=
"getList"
/>
/>
<!--寄售凭证-->
<FinishSettlementDialog
v-if=
"finishSettlementDialogShow"
:sale-id=
"currentSaleId"
:finish-dialog-show=
"finishSettlementDialogShow"
@
cancelDialog=
"finishSettlementDialogShow = false"
@
refreshList=
"getList"
/>
<el-dialog
<el-dialog
v-if=
"cancelConsignDialogShow"
v-if=
"cancelConsignDialogShow"
:visible.sync=
"cancelConsignDialogShow"
:visible.sync=
"cancelConsignDialogShow"
...
@@ -174,15 +183,17 @@
...
@@ -174,15 +183,17 @@
<
script
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
Pagination
from
'
@/components/Pagination
'
import
{
findConsignList
,
confirmReceive
,
identifyImage
,
cancelValue
}
from
'
@/api/business/consign
'
import
{
findConsignList
,
confirmReceive
,
cancelValue
}
from
'
@/api/business/consign
'
import
{
MessageBox
}
from
'
element-ui
'
import
{
MessageBox
}
from
'
element-ui
'
import
IdentifyValueDialog
from
'
./components/IdentifyValueDialog
'
import
IdentifyValueDialog
from
'
./components/IdentifyValueDialog
'
import
ImageValueDialog
from
'
./components/ImageValueDialog
'
import
ImageValueDialog
from
'
./components/ImageValueDialog
'
import
SaleConsignDialog
from
'
./components/SaleConsignDialog
'
import
SaleConsignDialog
from
'
./components/SaleConsignDialog
'
import
FinishSettlementDialog
from
'
./components/FinishSettlementDialog
'
export
default
{
export
default
{
name
:
'
ConsignList
'
,
name
:
'
ConsignList
'
,
components
:
{
components
:
{
FinishSettlementDialog
,
SaleConsignDialog
,
SaleConsignDialog
,
ImageValueDialog
,
ImageValueDialog
,
IdentifyValueDialog
,
IdentifyValueDialog
,
...
@@ -234,6 +245,8 @@ export default {
...
@@ -234,6 +245,8 @@ export default {
identifyValueDialogShow
:
false
,
identifyValueDialogShow
:
false
,
// 货品售出
// 货品售出
finishDialogShow
:
false
,
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
currentSaleId
:
''
,
currentSaleId
:
''
,
// 取消
// 取消
...
@@ -336,34 +349,6 @@ export default {
...
@@ -336,34 +349,6 @@ export default {
this
.
currentSaleId
=
item
.
saleId
this
.
currentSaleId
=
item
.
saleId
this
.
itemContent
=
item
this
.
itemContent
=
item
},
},
/**
* 实物评估
*/
handleIdentifyValue
()
{
if
(
this
.
itemContent
)
{
const
params
=
{
...
this
.
identifyValueForm
,
saleId
:
this
.
itemContent
.
saleId
}
this
.
$refs
.
identifyValue
.
validate
((
valid
)
=>
{
if
(
valid
)
{
identifyImage
(
params
)
.
then
(
response
=>
{
this
.
itemContent
=
{}
this
.
identifyValueDialogShow
=
false
this
.
identifyValueForm
=
{}
this
.
$notify
.
success
({
message
:
'
实物评估成功
'
})
this
.
getList
()
})
.
catch
(
response
=>
{
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
})
})
}
})
}
},
/**
/**
* 货品售出
* 货品售出
*/
*/
...
@@ -376,8 +361,9 @@ export default {
...
@@ -376,8 +361,9 @@ export default {
* 待用户结款
* 待用户结款
*/
*/
handleFinishSettlementDialogShow
(
item
)
{
handleFinishSettlementDialogShow
(
item
)
{
this
.
finishDialogShow
=
true
this
.
finish
Settlement
DialogShow
=
true
this
.
itemContent
=
item
this
.
itemContent
=
item
this
.
currentSaleId
=
item
.
saleId
},
},
/**
/**
* 取消寄售
* 取消寄售
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment