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
92413862
Commit
92413862
authored
Dec 26, 2023
by
yaya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化取消寄售功能
parent
07f59c99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
114 deletions
+132
-114
src/views/consign/components/CancelConsignDialog.vue
src/views/consign/components/CancelConsignDialog.vue
+111
-0
src/views/consign/consignDetail.vue
src/views/consign/consignDetail.vue
+9
-41
src/views/consign/consignList.vue
src/views/consign/consignList.vue
+12
-73
No files found.
src/views/consign/components/CancelConsignDialog.vue
0 → 100644
View file @
92413862
<
template
>
<el-dialog
v-if=
"cancelConsignDialogShow"
:visible.sync=
"cancelConsignDialogShow"
:before-close=
"handleCancelConsignDialog"
width=
"600px"
height=
"800px"
title=
"取消寄售"
>
<el-form
ref=
"cancel"
:model=
"cancelForm"
:rules=
"cancelRules"
>
<el-form-item
label=
"拒绝类型"
label-width=
"80px"
prop=
"content"
>
<el-select
v-model=
"cancelForm.content"
placeholder=
"请选择拒绝类型"
>
<el-option
label=
"平台取消寄售"
value=
"平台取消寄售"
/>
<el-option
label=
"用户取消寄售"
value=
"用户取消寄售"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"理由"
label-width=
"80px"
prop=
"remark"
>
<el-input
v-model=
"cancelForm.remark"
:autosize=
"
{ minRows: 8, maxRows: 8}"
style="width: 400px"
maxlength="100"
type="textarea"
show-word-limit
placeholder="请输入理由(最多不超过100个字)" />
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleCancelConsignDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleCancelValue"
>
确 定
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
MessageBox
}
from
'
element-ui
'
import
{
cancelValue
}
from
'
@/api/business/consign
'
export
default
{
name
:
'
CancelConsignDialog
'
,
props
:
{
cancelConsignDialogShow
:
{
type
:
Boolean
,
default
:
false
},
saleId
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
cancelForm
:
{
content
:
''
,
remark
:
''
},
cancelRules
:
{
content
:
[
{
required
:
true
,
message
:
'
请选择取消类型
'
,
trigger
:
'
blur
'
}
],
remark
:
[
{
required
:
true
,
message
:
'
原因不能为空
'
,
trigger
:
'
blur
'
}
]
}
}
},
methods
:
{
handleCancelConsignDialog
()
{
this
.
$emit
(
'
cancelDialog
'
)
},
/**
* 取消
*/
handleCancelValue
()
{
if
(
this
.
saleId
)
{
const
params
=
{
...
this
.
cancelForm
,
saleId
:
this
.
saleId
}
this
.
$refs
.
cancel
.
validate
((
valid
)
=>
{
if
(
valid
)
{
cancelValue
(
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
>
.content
{
width
:
100%
;
text-align
:
center
;
}
.image
{
width
:
400px
;
height
:
auto
;
}
</
style
>
src/views/consign/consignDetail.vue
View file @
92413862
...
...
@@ -120,35 +120,13 @@
@
cancelDialog
=
"
finishSettlementDialogShow = false
"
@
refreshList
=
"
handleGetDetail
"
/>
<
el
-
d
ialog
<
CancelConsignD
ialog
v
-
if
=
"
cancelConsignDialogShow
"
:
visible
.
sync
=
"
cancelConsignDialogShow
"
width
=
"
600px
"
height
=
"
800px
"
title
=
"
取消寄售
"
>
<
el
-
form
ref
=
"
cancel
"
:
model
=
"
cancelForm
"
:
rules
=
"
cancelRules
"
>
<
el
-
form
-
item
label
=
"
拒绝类型
"
label
-
width
=
"
80px
"
prop
=
"
content
"
>
<
el
-
select
v
-
model
=
"
cancelForm.content
"
placeholder
=
"
请选择拒绝类型
"
>
<
el
-
option
label
=
"
平台取消寄售
"
value
=
"
平台取消寄售
"
/>
<
el
-
option
label
=
"
用户取消寄售
"
value
=
"
用户取消寄售
"
/>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
理由
"
label
-
width
=
"
80px
"
prop
=
"
remark
"
>
<
el
-
input
v
-
model
=
"
cancelForm.remark
"
:
autosize
=
"
{ minRows: 8, maxRows: 8
}
"
style
=
"
width: 400px
"
maxlength
=
"
100
"
type
=
"
textarea
"
show
-
word
-
limit
placeholder
=
"
请输入理由(最多不超过100个字)
"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
@
click
=
"
cancelConsignDialogShow = false
"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
handleCancelValue
"
>
确
定
<
/el-button
>
<
/div
>
<
/el-dialog
>
:
cancel
-
consign
-
dialog
-
show
=
"
cancelConsignDialogShow
"
:
sale
-
id
=
"
saleId
"
@
cancelDialog
=
"
cancelConsignDialogShow = false
"
@
refreshList
=
"
handleGetDetail
"
/>
<
CheckLargeImageDialog
:
show
-
large
-
dialog
=
"
showLargeDialog
"
:
image
-
url
=
"
imageUrl
"
...
...
@@ -170,10 +148,11 @@ import IdentifyValueDialog from './components/IdentifyValueDialog'
import
ImageValueDialog
from
'
./components/ImageValueDialog
'
import
SaleConsignDialog
from
'
./components/SaleConsignDialog
'
import
FinishSettlementDialog
from
'
./components/FinishSettlementDialog
'
import
CancelConsignDialog
from
'
./components/CancelConsignDialog
'
export
default
{
name
:
'
ConsignDetail
'
,
components
:
{
FinishSettlementDialog
,
SaleConsignDialog
,
ImageValueDialog
,
IdentifyValueDialog
,
CheckVideoDialog
,
CheckLargeImageDialog
}
,
components
:
{
CancelConsignDialog
,
FinishSettlementDialog
,
SaleConsignDialog
,
ImageValueDialog
,
IdentifyValueDialog
,
CheckVideoDialog
,
CheckLargeImageDialog
}
,
data
()
{
return
{
saleId
:
''
,
...
...
@@ -197,19 +176,8 @@ export default {
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
cancelForm
:
{
content
:
''
,
remark
:
''
}
,
cancelConsignDialogShow
:
false
,
cancelRules
:
{
content
:
[
{
required
:
true
,
message
:
'
请选择取消类型
'
,
trigger
:
'
blur
'
}
],
remark
:
[
{
required
:
true
,
message
:
'
原因不能为空
'
,
trigger
:
'
blur
'
}
]
}
,
imageUrl
:
''
,
showLargeDialog
:
false
,
showVideoDialog
:
false
,
...
...
src/views/consign/consignList.vue
View file @
92413862
...
...
@@ -148,51 +148,31 @@
@
cancelDialog=
"finishSettlementDialogShow = false"
@
refreshList=
"getList"
/>
<el-dialog
<!--取消寄售-->
<CancelConsignDialog
v-if=
"cancelConsignDialogShow"
:visible.sync=
"cancelConsignDialogShow"
width=
"600px"
height=
"800px"
title=
"取消寄售"
>
<el-form
ref=
"cancel"
:model=
"cancelForm"
:rules=
"cancelRules"
>
<el-form-item
label=
"拒绝类型"
label-width=
"80px"
prop=
"content"
>
<el-select
v-model=
"cancelForm.content"
placeholder=
"请选择拒绝类型"
>
<el-option
label=
"平台取消寄售"
value=
"平台取消寄售"
/>
<el-option
label=
"用户取消寄售"
value=
"用户取消寄售"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"理由"
label-width=
"80px"
prop=
"remark"
>
<el-input
v-model=
"cancelForm.remark"
:autosize=
"{ minRows: 8, maxRows: 8}"
style=
"width: 400px"
maxlength=
"100"
type=
"textarea"
show-word-limit
placeholder=
"请输入理由(最多不超过100个字)"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"handleCancelFinishDialog"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleCancelValue"
>
确 定
</el-button>
</div>
</el-dialog>
:sale-id=
"currentSaleId"
:cancel-consign-dialog-show=
"cancelConsignDialogShow"
@
cancelDialog=
"cancelConsignDialogShow = false"
@
refreshList=
"getList"
/>
</div>
</template>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
findConsignList
,
confirmReceive
,
cancelValue
}
from
'
@/api/business/consign
'
import
{
findConsignList
,
confirmReceive
}
from
'
@/api/business/consign
'
import
{
MessageBox
}
from
'
element-ui
'
import
IdentifyValueDialog
from
'
./components/IdentifyValueDialog
'
import
ImageValueDialog
from
'
./components/ImageValueDialog
'
import
SaleConsignDialog
from
'
./components/SaleConsignDialog
'
import
FinishSettlementDialog
from
'
./components/FinishSettlementDialog
'
import
CancelConsignDialog
from
'
./components/CancelConsignDialog
'
export
default
{
name
:
'
ConsignList
'
,
components
:
{
CancelConsignDialog
,
FinishSettlementDialog
,
SaleConsignDialog
,
ImageValueDialog
,
...
...
@@ -247,24 +227,10 @@ export default {
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
currentSaleId
:
''
,
itemContent
:
{},
// 取消
cancelForm
:
{
content
:
''
,
remark
:
''
},
cancelConsignDialogShow
:
false
,
cancelRules
:
{
content
:
[
{
required
:
true
,
message
:
'
请选择取消类型
'
,
trigger
:
'
blur
'
}
],
remark
:
[
{
required
:
true
,
message
:
'
原因不能为空
'
,
trigger
:
'
blur
'
}
]
},
itemContent
:
{}
currentSaleId
:
''
}
},
created
()
{
...
...
@@ -371,34 +337,7 @@ export default {
handleCancelDialogShow
(
item
)
{
this
.
cancelConsignDialogShow
=
true
this
.
itemContent
=
item
},
/**
* 取消寄售
*/
handleCancelValue
()
{
if
(
this
.
itemContent
)
{
const
params
=
{
...
this
.
cancelForm
,
saleId
:
this
.
itemContent
.
saleId
}
this
.
$refs
.
cancel
.
validate
((
valid
)
=>
{
if
(
valid
)
{
cancelValue
(
params
)
.
then
(
response
=>
{
this
.
itemContent
=
{}
this
.
cancelConsignDialogShow
=
false
this
.
cancelForm
=
{}
this
.
$notify
.
success
({
message
:
'
取消寄售成功
'
})
this
.
getList
()
})
.
catch
(
response
=>
{
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
})
})
}
})
}
this
.
currentSaleId
=
item
.
saleId
},
/** 倒计时*/
countDown
(
row
)
{
...
...
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