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
2bcb8eee
Commit
2bcb8eee
authored
Jun 24, 2024
by
gaia
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/20240301_1544_sale' into release_pre_20240624175741
parents
cc0e9642
0aec10f4
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2491 additions
and
17 deletions
+2491
-17
src/api/business/sale.js
src/api/business/sale.js
+148
-0
src/router/index.js
src/router/index.js
+76
-0
src/views/order/saleOrderView.vue
src/views/order/saleOrderView.vue
+2
-2
src/views/sale/auctionAdd.vue
src/views/sale/auctionAdd.vue
+490
-0
src/views/sale/auctionDetail.vue
src/views/sale/auctionDetail.vue
+174
-0
src/views/sale/auctionList.vue
src/views/sale/auctionList.vue
+296
-0
src/views/sale/components/selectSpecialDialog.vue
src/views/sale/components/selectSpecialDialog.vue
+197
-0
src/views/sale/itemList.vue
src/views/sale/itemList.vue
+125
-15
src/views/sale/specialAdd.vue
src/views/sale/specialAdd.vue
+513
-0
src/views/sale/specialDetail.vue
src/views/sale/specialDetail.vue
+255
-0
src/views/sale/specialList.vue
src/views/sale/specialList.vue
+215
-0
No files found.
src/api/business/sale.js
View file @
2bcb8eee
...
@@ -53,3 +53,151 @@ export function irregularOff(data) {
...
@@ -53,3 +53,151 @@ export function irregularOff(data) {
})
})
}
}
/**
* 转拍品
* @param data
* @returns {*}
*/
export
function
collectorItemConvertToAuction
(
data
)
{
return
request
({
url
:
'
/supplierItem/collectorItemConvertToAuction
'
,
method
:
'
post
'
,
data
})
}
/**
* 拍品列表
* @param data
* @returns {*}
*/
export
function
findAuctionList
(
data
)
{
return
request
({
url
:
'
/supplierItem/findAuctionList
'
,
method
:
'
post
'
,
data
})
}
/**
* 拍品重新上架
* @param data
* @returns {*}
*/
export
function
auctionReSale
(
data
)
{
return
request
({
url
:
'
/specialPerformance/reSale
'
,
method
:
'
post
'
,
data
})
}
/**
* 专场列表
* @param data
* @returns {*}
*/
export
function
findSpecialList
(
data
)
{
return
request
({
url
:
'
/specialPerformance/findList
'
,
method
:
'
post
'
,
data
})
}
/**
* 添加专场
* @param data
* @returns {*}
*/
export
function
addSpecial
(
data
)
{
return
request
({
url
:
'
/specialPerformance/create
'
,
method
:
'
post
'
,
data
})
}
/**
* 删除专场
* @param data
* @returns {*}
*/
export
function
deleteSpecial
(
data
)
{
return
request
({
url
:
'
/specialPerformance/delete
'
,
method
:
'
post
'
,
data
})
}
/**
* 编辑专场
* @param data
* @returns {*}
*/
export
function
updateSpecial
(
data
)
{
return
request
({
url
:
'
/specialPerformance/update
'
,
method
:
'
post
'
,
data
})
}
/**
* 专场详情
* @param data
* @returns {*}
*/
export
function
specialDetail
(
data
)
{
return
request
({
url
:
'
/specialPerformance/findDetail
'
,
method
:
'
post
'
,
data
})
}
/**
* 专场下拍品
* @param data
* @returns {*}
*/
export
function
findSpecialListById
(
data
)
{
return
request
({
url
:
'
/specialPerformance/findItemListById
'
,
method
:
'
post
'
,
data
})
}
/**
* 专场选择拍品
* @param data
* @returns {*}
*/
export
function
findSupplierItemForSpecialPerformance
(
data
)
{
return
request
({
url
:
'
/supplierItem/findSupplierItemForSpecialPerformance
'
,
method
:
'
post
'
,
data
})
}
/**
* 删除专场下拍品
* @param data
* @returns {*}
*/
export
function
deleteSpecialItem
(
data
)
{
return
request
({
url
:
'
/specialPerformance/deleteItem
'
,
method
:
'
post
'
,
data
})
}
/**
* 添加专场下拍品
* @param data
* @returns {*}
*/
export
function
addSpecialItem
(
data
)
{
return
request
({
url
:
'
/specialPerformance/addItem
'
,
method
:
'
post
'
,
data
})
}
src/router/index.js
View file @
2bcb8eee
...
@@ -469,11 +469,87 @@ export const asyncRouterMap = [
...
@@ -469,11 +469,87 @@ export const asyncRouterMap = [
meta
:
{
meta
:
{
perms
:
[],
perms
:
[],
title
:
'
用户藏品
'
,
title
:
'
用户藏品
'
,
icon
:
'
logininfor
'
,
noCache
:
true
,
keepAlive
:
true
}
},
{
path
:
'
auctionList
'
,
component
:
()
=>
import
(
'
@/views/sale/auctionList
'
),
name
:
'
auctionList
'
,
meta
:
{
perms
:
[],
title
:
'
拍卖管理
'
,
icon
:
'
swagger
'
,
noCache
:
true
,
keepAlive
:
true
}
},
{
path
:
'
auctionDetail
'
,
component
:
()
=>
import
(
'
@/views/sale/auctionDetail
'
),
name
:
'
auctionDetail
'
,
meta
:
{
perms
:
[],
title
:
'
拍品详情
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
},
hidden
:
true
},
{
path
:
'
auctionAdd
'
,
component
:
()
=>
import
(
'
@/views/sale/auctionAdd
'
),
name
:
'
auctionAdd
'
,
meta
:
{
perms
:
[],
title
:
'
拍品编辑
'
,
icon
:
'
list
'
,
icon
:
'
list
'
,
noCache
:
true
,
noCache
:
true
,
keepAlive
:
true
keepAlive
:
true
},
hidden
:
true
},
{
path
:
'
specialList
'
,
component
:
()
=>
import
(
'
@/views/sale/specialList
'
),
name
:
'
specialList
'
,
meta
:
{
perms
:
[],
title
:
'
拍卖专场
'
,
icon
:
'
tab
'
,
noCache
:
true
,
keepAlive
:
true
}
}
},
},
{
path
:
'
specialAdd
'
,
component
:
()
=>
import
(
'
@/views/sale/specialAdd
'
),
name
:
'
specialAdd
'
,
meta
:
{
perms
:
[],
title
:
'
添加/编辑专场
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
},
hidden
:
true
},
{
path
:
'
specialDetail
'
,
component
:
()
=>
import
(
'
@/views/sale/specialDetail
'
),
name
:
'
specialDetail
'
,
meta
:
{
perms
:
[],
title
:
'
专场详情
'
,
icon
:
'
list
'
,
noCache
:
true
,
keepAlive
:
true
},
hidden
:
true
},
{
{
path
:
'
itemDetail
'
,
path
:
'
itemDetail
'
,
component
:
()
=>
import
(
'
@/views/sale/itemDetail
'
),
component
:
()
=>
import
(
'
@/views/sale/itemDetail
'
),
...
...
src/views/order/saleOrderView.vue
View file @
2bcb8eee
...
@@ -157,7 +157,7 @@ export default {
...
@@ -157,7 +157,7 @@ export default {
listQuery
:
{
listQuery
:
{
page
:
1
,
page
:
1
,
size
:
20
,
size
:
20
,
type
:
3
type
Str
:
'
2,3
'
}
,
}
,
list
:
[],
list
:
[],
total
:
0
,
total
:
0
,
...
@@ -183,7 +183,7 @@ export default {
...
@@ -183,7 +183,7 @@ export default {
this
.
listQuery
=
{
this
.
listQuery
=
{
page
:
1
,
page
:
1
,
limit
:
20
,
limit
:
20
,
type
:
3
type
Str
:
'
2,3
'
}
}
this
.
getList
()
this
.
getList
()
}
,
}
,
...
...
src/views/sale/auctionAdd.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<div>
<el-form
ref=
"goods"
:rules=
"rules"
:model=
"goods"
label-width=
"150px"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
拍品信息
</span>
</div>
<el-form-item
label=
"商品名称"
prop=
"name"
>
<el-input
v-model=
"goods.name"
/>
</el-form-item>
<el-form-item
label=
"商品详情"
prop=
"description"
>
<editor
:init=
"editorInit"
:style=
"
{'min-height':'300px' }" v-model="goods.description" />
</el-form-item>
</el-card>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
拍品图片
</span>
</div>
<el-form-item
label=
""
prop=
"images"
>
<div
v-if=
"goods.images && (typeof goods.images === 'object')"
class=
"ant-upload-list"
>
<draggable
:list=
"goods.images"
:options=
"
{group:'title', animation:150}"
:no-transition-on-drag="true"
class="syllable_ul"
element="ul"
@change="change"
>
<div
v-for=
"(item, index) in goods.images"
:key=
"index"
class=
"ant-upload-list-item"
>
<div
class=
"ant-upload-list-item-info"
>
<span>
<a
:href=
"item"
target=
"_blank"
rel=
"noopener noreferrer"
>
<img
:src=
"item"
class=
"ant-upload-list-item-thumbnail"
>
</a>
</span>
</div>
<span
class=
"ant-upload-list-item-actions"
>
<i
class=
"el-icon-delete"
@
click=
"removeImg(item)"
/>
</span>
</div>
</draggable>
</div>
<el-upload
:action=
"uploadPath"
:headers=
"headers"
:limit=
"9"
:file-list=
"itemImages"
:on-exceed=
"uploadOverrun"
:on-success=
"handleGalleryUrl"
:on-remove=
"handleRemove"
:show-file-list=
"false"
multiple
accept=
".jpg,.jpeg,.png,.gif"
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
/>
</el-upload>
<div>
建议上传尺寸3:4的图片,最多不超过9张
</div>
</el-form-item>
<!--
<el-form-item
label=
"图片"
prop=
"images"
>
<UploadFile
:product-top-images.sync=
"goods.images"
@
productTopImages=
"goods.images"
/>
</el-form-item>
-->
</el-card>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
拍品设置
</span>
</div>
<div>
<div
class=
"item"
>
<el-form-item
label=
"开始时间"
prop=
"auctionStartTime"
>
<el-date-picker
v-model=
"goods.auctionStartTime"
:picker-options=
"pickerOptions"
style=
"width:300px"
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
/>
</el-form-item>
<el-form-item
label=
"截拍时间"
prop=
"auctionEndTime"
>
<!--
<el-input
v-model=
"dataForm.bidtime"
/>
-->
<el-date-picker
v-model=
"goods.auctionEndTime"
:picker-options=
"pickerOptions"
style=
"width:300px"
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"选择日期时间"
/>
</el-form-item>
</div>
<div
class=
"item"
>
<el-form-item
label=
"起拍价"
prop=
"startPrice"
>
<el-input
v-model=
"goods.startPrice"
style=
"width: 300px"
>
<template
slot=
"prepend"
>
¥
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"加价幅度"
prop=
"addExtent"
>
<el-input
v-model=
"goods.addExtent"
style=
"width: 300px"
>
<
template
slot=
"prepend"
>
¥
</
template
>
</el-input>
</el-form-item>
</div>
<div
class=
"item"
>
<el-form-item
label=
"理想价"
>
<div>
{{ `${goods
&&
goods.distributionPrice ? `¥ ${goods.distributionPrice}` : '-'}` }}
</div>
</el-form-item>
</div>
</div>
</el-card>
</el-form>
<div
class=
"op-container"
>
<el-button
@
click=
"handleBack"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave"
>
保存
</el-button>
</div>
</div>
</template>
<
script
>
import
{
uploadPath
,
createStorage
}
from
'
@/api/business/storage
'
import
{
getToken
}
from
'
@/utils/auth
'
import
Editor
from
'
@tinymce/tinymce-vue
'
import
{
MessageBox
}
from
'
element-ui
'
import
{
createSale
,
findSaleDetail
,
updateSale
}
from
'
../../api/business/sale
'
import
UploadFile
from
'
./UploadImg
'
import
draggable
from
'
vuedraggable
'
export
default
{
name
:
'
SaleAdd
'
,
components
:
{
UploadFile
,
Editor
,
draggable
},
data
()
{
return
{
uploadPath
,
numType
:
-
1
,
goods
:
{
images
:
[],
type
:
1
,
buyLimitNum
:
0
},
pickerOptions
:
{
disabledDate
(
time
)
{
var
todayYear
=
(
new
Date
()).
getFullYear
()
var
todayMonth
=
(
new
Date
()).
getMonth
()
var
todayDay
=
(
new
Date
()).
getDate
()
-
1
var
todayTime
=
(
new
Date
(
todayYear
,
todayMonth
,
todayDay
,
'
23
'
,
'
59
'
,
'
59
'
)).
getTime
()
// 毫秒
return
time
.
getTime
()
<
todayTime
}
},
itemImages
:
[],
rules
:
{
images
:
[{
required
:
true
,
message
:
'
至少一张图片
'
,
trigger
:
'
blur
'
}],
name
:
[{
required
:
true
,
message
:
'
商品名称不能为空
'
,
trigger
:
'
blur
'
}],
auctionStartTime
:
[{
required
:
true
,
message
:
'
开始时间不能为空
'
,
trigger
:
'
blur
'
}],
auctionEndTime
:
[{
required
:
true
,
message
:
'
截拍时间不能为空
'
,
trigger
:
'
blur
'
}],
startPrice
:
[{
required
:
true
,
message
:
'
起拍价不能为空
'
,
trigger
:
'
blur
'
}],
addExtent
:
[{
required
:
true
,
message
:
'
加价幅度不能为空
'
,
trigger
:
'
blur
'
}]
},
editorInit
:
{
language
:
'
zh_CN
'
,
convert_urls
:
false
,
plugins
:
[
'
advlist anchor autolink autosave code codesample colorpicker colorpicker contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount
'
],
toolbar
:
[
'
searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent blockquote undo redo removeformat subscript superscript code codesample
'
,
'
hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen
'
],
images_upload_handler
:
function
(
blobInfo
,
success
,
failure
)
{
const
formData
=
new
FormData
()
formData
.
append
(
'
file
'
,
blobInfo
.
blob
())
createStorage
(
formData
)
.
then
(
res
=>
{
success
(
res
.
data
.
data
.
url
)
})
.
catch
(()
=>
{
failure
(
'
上传失败,请重新上传
'
)
})
}
}
}
},
computed
:
{
headers
()
{
return
{
'
X-Dts-Admin-Token
'
:
getToken
()
}
}
},
created
()
{
if
(
this
.
$route
.
query
.
id
==
null
)
{
return
}
this
.
id
=
this
.
$route
.
query
.
id
this
.
timeStr
=
this
.
$route
.
query
.
timeStr
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
})
this
.
handleGetDetail
(
loading
)
},
methods
:
{
change
()
{
const
newList
=
[]
for
(
var
i
=
0
;
i
<
this
.
goods
.
images
.
length
;
i
++
)
{
newList
.
push
({
url
:
this
.
goods
.
images
[
i
]
})
}
this
.
itemImages
=
newList
},
previewImg
(
url
)
{
window
.
open
(
url
,
'
_blank
'
)
},
removeImg
(
url
)
{
this
.
goods
.
images
.
forEach
((
val
,
key
)
=>
{
if
(
url
===
val
)
{
this
.
goods
.
images
.
splice
(
key
,
1
)
this
.
change
()
}
})
this
.
itemImages
.
forEach
((
val
,
key
)
=>
{
if
(
url
===
val
.
url
)
{
this
.
itemImages
.
splice
(
key
,
1
)
this
.
change
()
}
})
},
handlerNumTypeChange
(
e
)
{
console
.
log
(
'
==e==
'
,
e
)
},
handlerClose
(
imageList
)
{
this
.
itemImages
=
imageList
},
/**
* 获取详情
* @param loading
*/
handleGetDetail
(
loading
)
{
findSaleDetail
({
id
:
this
.
id
})
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
console
.
log
(
'
====
'
,
response
.
data
.
data
)
if
(
response
.
data
.
data
)
{
this
.
goods
=
response
.
data
.
data
if
(
!
response
.
data
.
data
.
buyLimitNum
||
response
.
data
.
data
.
buyLimitNum
===
-
1
)
{
this
.
goods
.
buyLimitNum
=
0
this
.
numType
=
-
1
}
else
{
this
.
numType
=
2
}
this
.
goods
.
images
=
response
.
data
.
data
.
images
?
response
.
data
.
data
.
images
.
split
(
'
;
'
)
:
[]
if
(
this
.
goods
.
images
&&
this
.
goods
.
images
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
this
.
goods
.
images
.
length
;
i
++
)
{
this
.
itemImages
.
push
({
url
:
this
.
goods
.
images
[
i
]
})
}
}
}
})
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
})
},
/**
* 返回
*/
handleBack
()
{
if
(
this
.
$route
.
query
.
noGoBack
)
{
this
.
$router
.
push
({
path
:
'
/dashboard
'
})
}
else
{
this
.
$router
.
go
(
-
1
)
}
},
/**
* 保存
*/
handleSave
()
{
if
(
this
.
goods
.
images
.
length
===
0
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
最少上传1张图片!
'
})
return
}
if
(
this
.
goods
.
stock
<=
0
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
库存需大于0!
'
})
return
}
if
(
this
.
numType
===
2
&&
this
.
goods
.
buyLimitNum
<=
0
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
限购数量需大于0!
'
})
return
}
if
(
this
.
goods
.
images
)
{
if
(
typeof
this
.
goods
.
images
!==
'
string
'
)
{
this
.
goods
.
images
=
this
.
goods
.
images
.
join
(
'
;
'
)
}
}
else
{
this
.
goods
.
images
=
''
}
this
.
$refs
.
goods
.
validate
((
valid
)
=>
{
if
(
valid
)
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
})
if
(
this
.
numType
===
-
1
)
{
this
.
goods
.
buyLimitNum
=
-
1
}
if
(
this
.
id
)
{
updateSale
(
this
.
goods
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
编辑成功
'
})
this
.
$router
.
push
({
path
:
'
/sale/saleList
'
})
})
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
goods
.
images
=
this
.
goods
.
images
.
split
(
'
;
'
)
||
[]
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
})
})
}
else
{
createSale
(
this
.
goods
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
创建成功
'
})
this
.
$router
.
push
({
path
:
'
/sale/saleList
'
})
})
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
goods
.
images
=
this
.
goods
.
images
.
split
(
'
;
'
)
||
[]
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
||
'
请求失败,请重试
'
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
})
})
}
}
})
},
/**
* 金额输入
* @param value
*/
limitInput
(
value
,
type
)
{
const
price
=
(
''
+
value
)
// 第一步:转成字符串
.
replace
(
/
[^\d
^
\.]
+/g
,
''
)
// 第二步:把不是数字,不是小数点的过滤掉
.
replace
(
/^0+
(\d)
/
,
'
$1
'
)
// 第三步:第一位0开头,0后面为数字,则过滤掉,取后面的数字
.
replace
(
/^
\.
/
,
'
0.
'
)
// 第四步:如果输入的第一位为小数点,则替换成 0. 实现自动补全
.
match
(
/^
\d
*
(\.?\d{0,2})
/g
)[
0
]
||
''
// 第五步:最终匹配得到结果 以数字开头,只有一个小数点, 而且小数点后面只能有0到2位小数
if
(
type
===
1
)
{
this
.
goods
.
distributionPrice
=
price
}
else
if
(
type
===
2
)
{
this
.
goods
.
supplyPrice
=
price
}
else
if
(
type
===
3
)
{
this
.
goods
.
rebate
=
price
}
},
uploadOverrun
:
function
()
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
上传文件个数超出限制!最多上传9张图片!
'
})
},
handleGalleryUrl
(
response
,
file
,
fileList
)
{
if
(
response
.
errno
===
0
)
{
this
.
goods
.
images
.
push
(
response
.
data
.
url
)
}
},
handleRemove
:
function
(
file
,
fileList
)
{
var
url
if
(
file
.
response
===
undefined
)
{
url
=
file
.
url
}
else
{
url
=
file
.
response
.
data
.
url
}
for
(
var
i
=
0
;
i
<
this
.
goods
.
images
.
length
;
i
++
)
{
// 这里存在两种情况
// 1. 如果所删除图片是刚刚上传的图片,那么图片地址是file.response.data.url
// 此时的file.url虽然存在,但是是本机地址,而不是远程地址。
// 2. 如果所删除图片是后台返回的已有图片,那么图片地址是file.url
if
(
this
.
goods
.
images
[
i
]
===
url
)
{
this
.
goods
.
images
.
splice
(
i
,
1
)
}
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.box-card
{
margin
:
24px
;
}
.item
{
display
:
flex
;
}
.op-container
{
display
:
flex
;
justify-content
:
center
;
padding
:
0
24px
24px
;
}
/
deep
/
.el-form-item__content
{
margin-left
:
0
;
}
/
deep
/
.syllable_ul
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
}
/
deep
/
.el-icon-delete
{
color
:
white
;
}
/
deep
/
.el-upload--picture-card
{
margin-left
:
40px
;
}
.ant-upload-list
{
display
:
flex
;
flex-direction
:
row
;
}
.ant-upload-list-item
{
display
:
flex
;
flex-direction
:
row
;
width
:
146px
;
height
:
146px
;
margin
:
0
12px
12px
0
;
.ant-upload-list-item-info
{
position
:
relative
;
}
.ant-upload-list-item-actions
{
width
:
146px
;
height
:
30px
;
position
:
absolute
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
top
:
0
;
margin-top
:
136px
;
background
:
rgba
(
0
,
0
,
0
,
0
.5
);
border-radius
:
0
0
12px
12px
;
}
.ant-upload-list-item-thumbnail
{
width
:
146px
;
height
:
146px
;
border-radius
:
12px
;
}
}
</
style
>
src/views/sale/auctionDetail.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<div
class=
"page_itemDetail"
>
<el-card
class=
"box-card"
style=
"margin: 16px"
>
<h3>
拍品信息
</h3>
<div
class=
"user_info flex"
>
<el-form
ref=
"addInviteRef"
label-width=
"120px"
>
<el-form-item
label=
"商品名称:"
>
<div>
{{
itemContent
&&
itemContent
.
name
||
'
-
'
}}
</div>
</el-form-item>
<el-form-item
label=
"商品详情:"
>
<div>
{{
itemContent
&&
itemContent
.
description
||
'
-
'
}}
</div>
</el-form-item>
<el-form-item
label=
"商品图片/视频:"
>
<div
v-if=
"itemContent && itemContent.imagelist && (typeof itemContent.imagelist === 'object')"
class=
"image"
>
<div
v-for=
"item in itemContent.imagelist"
:key=
"item.url"
class=
"image_item"
@
click=
"handleShowLargeDialog(item.type, item.url, item.videoUrl)"
>
<img
:src=
"item.url"
class=
"image_item_content"
>
<img
v-if=
"item.type === 1"
class=
"image_content_video_icon"
src=
"https://cdn.wanwudezhi.com/static/web-static/image/10651432d8c28651da81753c260d81b3_120x120.png"
>
</div>
</div>
</el-form-item>
<el-form-item
label=
"起拍价:"
>
<div>
{{
`${itemContent && itemContent.startPrice ? `
¥
$
{
itemContent
.
startPrice
}
` : '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
加价幅度:
"
>
<
div
>
{{
`${itemContent && itemContent.addExtent ? `
¥
$
{
itemContent
.
addExtent
}
` : '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
理想价:
"
>
<
div
>
{{
`${itemContent && itemContent.distributionPrice ? `
¥
$
{
itemContent
.
distributionPrice
}
` : '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
中拍价:
"
>
<
div
>
{{
`${itemContent && itemContent.salePrice ? `
¥
$
{
itemContent
.
salePrice
}
` : '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
/el-form
>
<
/div
>
<
/el-card
>
<
CheckLargeImageDialog
:
show
-
large
-
dialog
=
"
showLargeDialog
"
:
image
-
url
=
"
imageUrl
"
@
closeLargeDialog
=
"
showLargeDialog = false
"
/>
<
CheckVideoDialog
:
show
-
video
-
dialog
=
"
showVideoDialog
"
:
video
-
url
=
"
videosUrl
"
@
closeLargeDialog
=
"
showVideoDialog = false
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
findSaleDetail
}
from
'
../../api/business/sale
'
import
CheckLargeImageDialog
from
'
../goods/components/CheckLargeImageDialog
'
import
CheckVideoDialog
from
'
../goods/components/CheckVideoDialog
'
export
default
{
name
:
'
AuctionDetail
'
,
components
:
{
CheckVideoDialog
,
CheckLargeImageDialog
}
,
data
()
{
return
{
id
:
''
,
itemContent
:
{
}
,
imageUrl
:
''
,
showLargeDialog
:
false
,
showVideoDialog
:
false
,
videosUrl
:
''
}
}
,
created
()
{
if
(
this
.
$route
.
query
.
id
==
null
)
{
return
}
this
.
id
=
this
.
$route
.
query
.
id
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
}
)
this
.
handleGetDetail
(
loading
)
}
,
methods
:
{
/**
* 获取详情
* @param loading
*/
handleGetDetail
(
loading
)
{
findSaleDetail
({
id
:
this
.
id
}
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
console
.
log
(
'
====
'
,
response
.
data
.
data
)
if
(
response
.
data
.
data
)
{
this
.
itemContent
=
response
.
data
.
data
this
.
itemContent
.
images
=
response
.
data
.
data
.
images
?
response
.
data
.
data
.
images
.
split
(
'
;
'
)
:
[]
const
imageList
=
[]
if
(
this
.
itemContent
.
videos
)
{
const
videoList
=
this
.
itemContent
.
videos
.
split
(
'
,
'
)
if
(
videoList
.
length
===
2
)
{
imageList
.
push
({
url
:
videoList
[
1
],
type
:
1
,
videoUrl
:
videoList
[
0
]
}
)
}
}
if
(
this
.
itemContent
.
images
&&
this
.
itemContent
.
images
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
this
.
itemContent
.
images
.
length
;
i
++
)
{
imageList
.
push
({
url
:
this
.
itemContent
.
images
[
i
],
videoUrl
:
''
,
type
:
2
}
)
}
}
this
.
itemContent
.
imagelist
=
imageList
}
}
)
.
catch
(
response
=>
{
console
.
log
(
'
====erro
'
,
response
)
if
(
loading
)
{
loading
.
close
()
}
}
)
}
,
/**
* 展示大图
* @param imageUrl
*/
handleShowLargeDialog
(
type
,
imageUrl
,
videoUrl
)
{
if
(
type
===
1
)
{
this
.
videosUrl
=
videoUrl
this
.
showVideoDialog
=
true
}
else
{
this
.
imageUrl
=
imageUrl
this
.
showLargeDialog
=
true
}
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
page_itemDetail
{
padding
:
20
px
;
.
image
{
width
:
100
%
;
display
:
flex
;
flex
-
direction
:
row
;
}
.
image_item
{
width
:
100
px
;
height
:
100
px
;
margin
-
right
:
10
px
;
margin
-
top
:
16
px
;
position
:
relative
;
.
image_item_content
{
width
:
100
px
;
height
:
100
px
;
}
.
image_content_video_icon
{
position
:
absolute
;
width
:
30
px
;
height
:
30
px
;
top
:
10
px
;
left
:
10
px
;
}
}
}
/deep/
.
el
-
form
-
item
{
margin
-
bottom
:
0
}
<
/style
>
src/views/sale/auctionList.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<div
class=
"page_consignList"
>
<div
class=
"filter-container"
>
<div
class=
"button_left"
>
<el-input
v-model=
"listQuery.name"
clearable
class=
"filter-item"
style=
"width: 200px;"
placeholder=
"请输入标题"
/>
<el-select
v-model=
"listQuery.auctionState"
placeholder=
"请选择拍卖状态"
class=
"filter-item"
style=
"width: 200px;"
clearable
>
<el-option
v-for=
"item in options"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
size=
"mini"
/>
</el-select>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"margin-left: 12px"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
highlight-current-row
>
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"拍卖ID"
fixed=
"left"
/>
<el-table-column
align=
"center"
label=
"封面图"
prop=
"itemImg"
>
<template
slot-scope=
"scope"
>
<div
class=
"image_preview"
>
<el-image
:preview-src-list=
"scope.row.images.split(';')"
:src=
"scope.row.images.split(';')[0]"
class=
"table-td-thumb"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"拍卖名称"
min-width=
"150px"
prop=
"name"
>
<
template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.name"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"起拍价"
prop=
"startPrice"
>
<
template
slot-scope=
"scope"
>
<span
class=
"tooltip-span"
>
{{
`${scope.row.startPrice ? `
¥
$
{
scope
.
row
.
startPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
加价幅度
"
prop
=
"
addExtent
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.addExtent ? `
¥
$
{
scope
.
row
.
addExtent
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
理想价格
"
prop
=
"
distributionPrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.distributionPrice ? `
¥
$
{
scope
.
row
.
distributionPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
中拍价
"
prop
=
"
salePrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.salePrice ? `
¥
$
{
scope
.
row
.
salePrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
数量
"
prop
=
"
stock
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
发布者
"
prop
=
"
creatorName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
更新时间
"
prop
=
"
updateTime
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
状态
"
prop
=
"
auctionStateName
"
width
=
"
100
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.auctionStateName || '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
300
"
fixed
=
"
right
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
详情
<
/el-button
>
<!--
预展中,竞拍中,中拍未付款,成交
-->
<!--
(
1
,
"
待上架
"
),
(
2
,
"
竞拍中
"
),
(
3
,
"
已截拍
"
),
(
10
,
"
预展中
"
),
(
30
,
"
中拍未付款
"
),
(
40
,
"
中拍未付款流拍
"
),
(
50
,
"
无出价流拍
"
),
(
100
,
"
成交
"
),
-->
<
el
-
button
:
disabled
=
"
(scope.row.auctionState === 10 || scope.row.auctionState === 2 || scope.row.auctionState === 30 || scope.row.auctionState === 100)
"
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToEdit(scope.row)
"
>
编辑
<
/el-button
>
<
el
-
button
v
-
if
=
"
(scope.row.auctionState === 40 || scope.row.auctionState === 50)
"
type
=
"
danger
"
size
=
"
mini
"
@
click
=
"
handleResale(scope.row)
"
>
重新上架
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
updateOnSale
,
findAuctionList
,
auctionReSale
}
from
'
@/api/business/sale
'
import
{
MessageBox
}
from
'
element-ui
'
export
default
{
name
:
'
SaleList
'
,
components
:
{
Pagination
,
Line2Hidden
}
,
data
()
{
return
{
itemKey
:
0
,
options
:
[{
value
:
1
,
label
:
'
待上架
'
}
,
{
value
:
10
,
label
:
'
预展中
'
}
,
{
value
:
2
,
label
:
'
竞拍中
'
}
,
{
value
:
30
,
label
:
'
中拍未付款
'
}
,
{
value
:
100
,
label
:
'
成交
'
}
,
{
value
:
40
,
label
:
'
中拍未付款流拍
'
}
,
{
value
:
50
,
label
:
'
无出价流拍
'
}
],
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
}
,
list
:
[],
total
:
0
,
// 图文估价
imageValueDialogShow
:
false
,
// 建议寄售价
identifyValueDialogShow
:
false
,
// 货品售出
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
cancelConsignDialogShow
:
false
,
currentSaleId
:
''
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleReset
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
}
this
.
getList
()
}
,
handleSaleSwitch
(
e
,
item
)
{
const
params
=
{
id
:
item
.
id
,
isOnSale
:
e
}
updateOnSale
(
params
)
.
then
(
response
=>
{
this
.
$notify
.
success
({
message
:
e
?
'
上架成功
'
:
'
下架成功
'
}
)
}
)
.
catch
(
response
=>
{
item
.
isOnSale
=
!
e
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
}
)
}
)
}
,
handleCreate
()
{
this
.
$router
.
push
({
path
:
'
/sale/saleAdd
'
}
)
}
,
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleClick
(
tab
,
event
)
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
getList
()
{
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
findAuctionList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
,
/**
* 详情
*/
handleToDetail
(
item
)
{
this
.
$router
.
push
({
path
:
'
/sale/AuctionDetail
'
,
query
:
{
id
:
item
.
id
}}
)
}
,
/**
* 详情
*/
handleToEdit
(
item
)
{
this
.
$router
.
push
({
path
:
'
/sale/AuctionAdd
'
,
query
:
{
id
:
item
.
id
}}
)
}
,
/**
* 重新上架
*/
handleResale
(
row
)
{
this
.
$confirm
(
'
确定将该拍品重新上架吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
const
data
=
{
itemId
:
row
.
id
}
auctionReSale
(
data
).
then
((
res
)
=>
{
this
.
list
=
this
.
list
.
filter
((
item
)
=>
{
if
(
item
.
id
===
row
.
id
)
{
item
.
auctionStateName
=
'
待上架
'
item
.
auctionState
=
1
return
item
}
return
item
}
)
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
上架成功
'
}
)
this
.
getList
()
}
).
catch
(
err
=>
{
this
.
$notify
.
error
({
title
:
'
失败
'
,
message
:
err
.
data
.
errmsg
}
)
}
)
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
/deep/
.
el
-
switch
{
height
:
30
px
;
}
/deep/
.
cell
{
display
:
flex
;
justify
-
content
:
center
;
}
.
page_consignList
{
padding
:
20
px
;
.
filter
-
container
{
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
}
.
image_preview
{
width
:
60
px
;
height
:
60
px
;
align
-
content
:
center
;
justify
-
content
:
center
;
}
}
<
/style
>
src/views/sale/components/selectSpecialDialog.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<el-dialog
v-if=
"showAddSpecialDialog"
:visible.sync=
"showAddSpecialDialog"
:before-close=
"handleCancelConsignDialog"
width=
"1000px"
height=
"600px"
title=
"添加拍品"
>
<el-table
v-loading=
"listLoading"
:data=
"list"
:row-key=
"getRowKeys"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
height=
"600"
highlight-current-row
@
selection-change=
"handleSelectionChange"
>
<el-table-column
:reserve-selection=
"true"
type=
"selection"
width=
"55"
/>
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"拍卖ID"
fixed=
"left"
/>
<el-table-column
align=
"center"
label=
"拍品图片"
prop=
"itemImg"
>
<template
slot-scope=
"scope"
>
<div
class=
"image_preview"
>
<el-image
:preview-src-list=
"scope.row.images.split(';')"
:src=
"scope.row.images.split(';')[0]"
class=
"table-td-thumb"
/>
</div>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"拍卖标题"
min-width=
"150px"
prop=
"name"
>
<
template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.name"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"起拍价"
prop=
"startPrice"
>
<
template
slot-scope=
"scope"
>
<span
class=
"tooltip-span"
>
{{
`${scope.row.startPrice ? `
¥
$
{
scope
.
row
.
startPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
加价幅度
"
prop
=
"
addExtent
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.addExtent ? `
¥
$
{
scope
.
row
.
addExtent
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
理想价格
"
prop
=
"
distributionPrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.distributionPrice ? `
¥
$
{
scope
.
row
.
distributionPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
发布者
"
prop
=
"
creatorName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
更新时间
"
prop
=
"
updateTime
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
状态
"
prop
=
"
auctionStateName
"
width
=
"
100
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.auctionStateName || '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
@
click
=
"
handleCancelConsignDialog
"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
handleSubmit
"
>
确
定
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/template
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
findSupplierItemForSpecialPerformance
,
addSpecialItem
}
from
'
@/api/business/sale
'
export
default
{
name
:
'
SelectSpecialDialog
'
,
components
:
{
Pagination
,
Line2Hidden
}
,
props
:
{
showAddSpecialDialog
:
{
type
:
Boolean
,
default
:
false
}
,
specialPerformanceId
:
{
type
:
Number
,
default
:
0
}
}
,
data
()
{
return
{
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
}
,
list
:
[],
total
:
0
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
getRowKeys
(
row
)
{
return
row
.
id
}
,
/**
* 多选
*/
handleSelectionChange
(
val
)
{
if
(
val
&&
val
.
length
>
0
)
{
this
.
selectionIdList
=
val
.
map
((
item
)
=>
{
return
item
.
id
}
)
}
else
{
this
.
selectionIdList
=
[]
}
console
.
log
(
'
=====选中列表=
'
,
this
.
selectionIdList
)
}
,
handleCancelConsignDialog
()
{
this
.
$emit
(
'
cancelDialog
'
)
}
,
getList
()
{
this
.
listLoading
=
true
this
.
listQuery
.
specialPerformanceId
=
this
.
specialPerformanceId
findSupplierItemForSpecialPerformance
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
,
handleSubmit
()
{
if
(
!
this
.
selectionIdList
||
this
.
selectionIdList
.
length
===
0
)
{
this
.
$notify
.
warning
({
message
:
'
请选择藏品
'
}
)
return
}
const
params
=
{
itemIds
:
this
.
selectionIdList
.
join
(
'
,
'
),
specialPerformanceId
:
this
.
specialPerformanceId
}
addSpecialItem
(
params
).
then
(
response
=>
{
this
.
$notify
.
success
({
message
:
'
添加拍品成功
'
}
)
this
.
$emit
(
'
refreshList
'
)
this
.
$emit
(
'
cancelDialog
'
)
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
content
{
width
:
100
%
;
text
-
align
:
center
;
}
.
image_preview
{
width
:
90
px
;
height
:
60
px
;
align
-
content
:
center
;
justify
-
content
:
center
;
display
:
flex
;
.
table
-
td
-
thumb
{
width
:
60
px
;
height
:
60
px
;
}
}
.
image
{
width
:
400
px
;
height
:
auto
;
}
<
/style
>
src/views/sale/itemList.vue
View file @
2bcb8eee
...
@@ -17,11 +17,18 @@
...
@@ -17,11 +17,18 @@
:key=
"item.label"
:key=
"item.label"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
:value=
"item.value"
size=
"mini"
/>
size=
"mini"
/>
</el-select>
</el-select>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
style=
"margin-left: 12px"
@
click=
"handleFilter"
>
查找
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"margin-left: 12px"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"margin-left: 12px"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<el-button
size=
"mini"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleMultiAuction"
>
转拍卖
</el-button>
</div>
</div>
<el-table
<el-table
v-loading=
"listLoading"
v-loading=
"listLoading"
...
@@ -30,10 +37,14 @@
...
@@ -30,10 +37,14 @@
element-loading-text=
"正在查询中..."
element-loading-text=
"正在查询中..."
border
border
fit
fit
highlight-current-row
>
highlight-current-row
<!--
<el-table-column
align=
"center"
label=
"排行"
width=
"100px"
type=
"index"
/>
-->
@
selection-change=
"handleSelectionChange"
>
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"商品ID"
/>
<el-table-column
<el-table-column
align=
"center"
label=
"封面图"
prop=
"itemImg"
>
:selectable=
"checkboxInit"
type=
"selection"
width=
"55"
/>
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"id"
label=
"拍品ID"
fixed=
"left"
/>
<el-table-column
align=
"center"
label=
"封面图"
prop=
"itemImg"
min-width=
"100px"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<!--
<img
v-if=
"scope.row.images"
:src=
"scope.row.images.split(';')[0]"
width=
"60px"
height=
"60px"
@
click=
"handleShowPreview(scope.row.images)"
>
-->
<!--
<img
v-if=
"scope.row.images"
:src=
"scope.row.images.split(';')[0]"
width=
"60px"
height=
"60px"
@
click=
"handleShowPreview(scope.row.images)"
>
-->
<div
class=
"image_preview"
>
<div
class=
"image_preview"
>
...
@@ -68,24 +79,26 @@
...
@@ -68,24 +79,26 @@
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
stock
"
label
=
"
库存
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
stock
"
label
=
"
库存
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
creatorName
"
label
=
"
作者
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
creatorName
"
label
=
"
作者
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
creatorId
"
label
=
"
用户ID
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
class
=
"
user_self
"
@
click
=
"
handleToSelf(scope.row)
"
>
{{
scope
.
row
.
creatorId
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
updateTime
"
label
=
"
更新时间
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
updateTime
"
label
=
"
更新时间
"
/>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
statusName
"
label
=
"
状态
"
>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
statusName
"
label
=
"
状态
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.statusName || '-'
}
`
}}
<
/span
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.statusName || '-'
}
`
}}
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
2
0
0
"
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
2
6
0
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
<
el
-
button
type
=
"
primary
"
type
=
"
primary
"
size
=
"
mini
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
详情
@
click
=
"
handleToDetail(scope.row)
"
>
详情
<
/el-button
>
<
/el-button
>
<
el
-
button
v
-
if
=
"
scope.row.status === 0
"
:
disabled
=
"
scope.row.isTransformAuction
"
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToAuction(scope.row)
"
>
转拍卖
<
/el-button
>
<
el
-
button
<
el
-
button
v
-
if
=
"
scope.row.status === 0
"
v
-
if
=
"
scope.row.status === 0
"
type
=
"
danger
"
type
=
"
danger
"
...
@@ -105,7 +118,7 @@
...
@@ -105,7 +118,7 @@
@
pagination
=
"
getList
"
/>
@
pagination
=
"
getList
"
/>
<
ImagePreview
<
ImagePreview
v
-
if
=
"
isShowPreview
"
v
-
if
=
"
isShowPreview
"
:
imglist
=
"
imagesPreviewList
"
/>
:
imglist
=
"
imagesPreviewList
"
/>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -113,7 +126,7 @@
...
@@ -113,7 +126,7 @@
<
script
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
Pagination
from
'
@/components/Pagination
'
import
{
getSaleList
,
updateOnSale
,
deleteSaleItem
,
irregularOff
}
from
'
@/api/business/sale
'
import
{
getSaleList
,
updateOnSale
,
deleteSaleItem
,
irregularOff
,
collectorItemConvertToAuction
}
from
'
@/api/business/sale
'
import
{
MessageBox
}
from
'
element-ui
'
import
{
MessageBox
}
from
'
element-ui
'
export
default
{
export
default
{
...
@@ -159,13 +172,55 @@ export default {
...
@@ -159,13 +172,55 @@ export default {
cancelConsignDialogShow
:
false
,
cancelConsignDialogShow
:
false
,
isShowPreview
:
false
,
isShowPreview
:
false
,
currentSaleId
:
''
,
currentSaleId
:
''
,
imagesPreviewList
:
[]
imagesPreviewList
:
[],
selectionIdList
:
[]
}
}
}
,
}
,
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
}
,
}
,
methods
:
{
methods
:
{
/**
* 设置不可选中
*/
checkboxInit
(
row
)
{
if
(
row
.
status
===
0
&&
!
row
.
isTransformAuction
)
{
return
1
}
else
{
return
0
}
}
,
/**
* 多选
*/
handleSelectionChange
(
val
)
{
if
(
val
&&
val
.
length
>
0
)
{
this
.
selectionIdList
=
val
.
map
((
item
)
=>
{
return
item
.
id
}
)
}
else
{
this
.
selectionIdList
=
[]
}
console
.
log
(
'
=====选中列表=
'
,
this
.
selectionIdList
)
}
,
/**
* 批量拍卖
*/
handleMultiAuction
()
{
if
(
!
this
.
selectionIdList
||
this
.
selectionIdList
.
length
===
0
)
{
this
.
$notify
.
warning
({
message
:
'
请选择藏品
'
}
)
return
}
this
.
$confirm
(
'
确定将选中的藏品设置成拍卖吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
this
.
handleRequestToAuction
(
''
)
}
)
}
,
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
listQuery
.
page
=
1
this
.
getList
()
this
.
getList
()
...
@@ -258,6 +313,50 @@ export default {
...
@@ -258,6 +313,50 @@ export default {
}
)
}
)
}
)
}
)
}
,
}
,
/**
* 转拍卖
*/
handleToAuction
(
row
)
{
this
.
$confirm
(
'
确定将该藏品设置成拍卖吗?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
this
.
handleRequestToAuction
(
row
.
id
)
}
)
}
,
/**
* 转拍品
* @param this.userDetail
*/
handleRequestToAuction
(
itemId
)
{
if
(
!
itemId
&&
this
.
selectionIdList
.
length
===
0
)
{
return
}
const
params
=
{
itemIdsStr
:
itemId
?
String
(
itemId
)
:
this
.
selectionIdList
.
join
(
'
,
'
)
}
collectorItemConvertToAuction
(
params
).
then
(
response
=>
{
if
(
itemId
)
{
this
.
list
=
this
.
list
.
filter
((
item
)
=>
{
if
(
item
.
id
===
itemId
)
{
item
.
isTransformAuction
=
true
return
item
}
return
item
}
)
}
else
{
this
.
getList
()
this
.
selectionIdList
=
[]
}
this
.
$notify
.
success
({
message
:
'
转拍品成功
'
}
)
}
).
catch
((
e
)
=>
{
console
.
log
(
'
===报错=
'
,
e
)
this
.
$message
.
error
(
e
.
data
&&
e
.
data
.
errmsg
||
'
请求失败, 请重试
'
)
}
)
}
,
/**
/**
* 违规下架
* 违规下架
* @param this.userDetail
* @param this.userDetail
...
@@ -307,17 +406,28 @@ export default {
...
@@ -307,17 +406,28 @@ export default {
.
page_consignList
{
.
page_consignList
{
padding
:
20
px
;
padding
:
20
px
;
.
red_button
{
font
-
weight
:
500
;
color
:
#
f56c6c
;
}
.
image_preview
{
.
image_preview
{
width
:
60
px
;
width
:
60
px
;
height
:
60
px
;
height
:
60
px
;
align
-
content
:
center
;
align
-
content
:
center
;
justify
-
content
:
center
;
justify
-
content
:
center
;
}
}
.
filter
-
auction
{
margin
-
left
:
auto
;
height
:
40
px
;
}
.
filter
-
container
{
.
filter
-
container
{
width
:
100
%
;
display
:
flex
;
display
:
flex
;
flex
-
direction
:
row
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
justify
-
content
:
space
-
between
;
}
}
.
user_self
{
.
user_self
{
color
:
#
409
EFF
;
color
:
#
409
EFF
;
}
}
...
...
src/views/sale/specialAdd.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<div>
<div
class=
"op-container"
>
<el-button
type=
"primary"
@
click=
"handleSave"
>
保存
</el-button>
<el-button
@
click=
"handleBack"
>
取消
</el-button>
</div>
<el-form
ref=
"goods"
:rules=
"rules"
:model=
"goods"
label-width=
"150px"
>
<el-card
class=
"box-card"
>
<el-form-item
label=
"专场标题:"
prop=
"title"
>
<el-input
v-model=
"goods.title"
:maxlength=
"15"
/>
</el-form-item>
<el-form-item
label=
"时间:"
prop=
"startTime"
>
<el-date-picker
v-model=
"specialTime"
:picker-options=
"pickerOptions"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
format=
"yyyy-MM-dd HH:mm:ss"
value-format=
"yyyy-MM-dd HH:mm:ss"
align=
"right"
@
change=
"handleSetTime"
/>
</el-form-item>
<el-form-item
label=
"背景图:"
prop=
"backgroundImage"
>
<el-upload
:action=
"uploadPath"
:headers=
"headers"
:limit=
"1"
:file-list=
"itemImages"
:on-exceed=
"uploadOverrun"
:on-success=
"handleGalleryUrl"
:on-remove=
"handleRemove"
accept=
".jpg,.jpeg,.png,.gif"
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
/>
</el-upload>
<div>
建议尺寸2000*1024
</div>
</el-form-item>
</el-card>
<el-card
v-if=
"id"
class=
"box-card"
>
<div
class=
"op-add"
>
<div
class=
"item_num"
>
{{
`${total > 0 ? `
共计
$
{
total
}件藏品
` : ''
}
`
}}
<
/div
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
handleAdd
"
>
添加拍品
<
/el-button
>
<
/div
>
<
el
-
table
v
-
loading
=
"
listLoading
"
:
data
=
"
list
"
size
=
"
small
"
element
-
loading
-
text
=
"
正在查询中...
"
border
fit
height
=
"
600
"
highlight
-
current
-
row
>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
id
"
label
=
"
拍卖ID
"
fixed
=
"
left
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
拍品图片
"
prop
=
"
itemImg
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
class
=
"
image_preview
"
>
<
el
-
image
:
preview
-
src
-
list
=
"
scope.row.images.split(';')
"
:
src
=
"
scope.row.images.split(';')[0]
"
class
=
"
table-td-thumb
"
/>
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
拍卖标题
"
min
-
width
=
"
150px
"
prop
=
"
name
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
Line2Hidden
:
text
=
"
scope.row.name
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
起拍价
"
prop
=
"
startPrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.startPrice ? `
¥
$
{
scope
.
row
.
startPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
加价幅度
"
prop
=
"
addExtent
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.addExtent ? `
¥
$
{
scope
.
row
.
addExtent
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
理想价格
"
prop
=
"
distributionPrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.distributionPrice ? `
¥
$
{
scope
.
row
.
distributionPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
发布者
"
prop
=
"
creatorName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
状态
"
prop
=
"
auctionStateName
"
width
=
"
100
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.auctionStateName || '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
100
"
>
<
template
slot
-
scope
=
"
scope
"
>
<!--
预展中、竞拍中
-->
<
el
-
button
:
disabled
=
"
(scope.row.auctionState === 10 || scope.row.auctionState === 2)
"
type
=
"
danger
"
size
=
"
mini
"
@
click
=
"
handleDeleteSpecialItem(scope.row)
"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
if
=
"
total > 0
"
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/el-card
>
<
/el-form
>
<
SelectSpecialDialog
v
-
if
=
"
isShowAddSpecialDialog
"
:
show
-
add
-
special
-
dialog
=
"
isShowAddSpecialDialog
"
:
special
-
performance
-
id
=
"
id
"
@
cancelDialog
=
"
isShowAddSpecialDialog = false
"
@
refreshList
=
"
handleFilter
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
uploadPath
}
from
'
@/api/business/storage
'
import
{
getToken
}
from
'
@/utils/auth
'
import
Editor
from
'
@tinymce/tinymce-vue
'
import
{
MessageBox
}
from
'
element-ui
'
import
{
addSpecial
,
specialDetail
,
updateSpecial
,
findSpecialListById
,
deleteSpecialItem
}
from
'
../../api/business/sale
'
import
UploadFile
from
'
./UploadImg
'
import
draggable
from
'
vuedraggable
'
import
SelectSpecialDialog
from
'
./components/selectSpecialDialog
'
import
Pagination
from
'
@/components/Pagination
'
import
Line2Hidden
from
'
@/components/line2Hidden
'
export
default
{
name
:
'
SaleAdd
'
,
components
:
{
Pagination
,
SelectSpecialDialog
,
UploadFile
,
Editor
,
draggable
,
Line2Hidden
}
,
data
()
{
return
{
id
:
''
,
isShowAddSpecialDialog
:
false
,
listLoading
:
false
,
listQuery
:
{
page
:
1
,
limit
:
20
}
,
list
:
[],
total
:
0
,
specialTime
:
[],
uploadPath
,
numType
:
-
1
,
goods
:
{
backgroundImage
:
''
}
,
pickerOptions
:
{
shortcuts
:
[{
text
:
'
最近一周
'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
7
)
picker
.
$emit
(
'
pick
'
,
[
start
,
end
])
}
}
,
{
text
:
'
最近一个月
'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
30
)
picker
.
$emit
(
'
pick
'
,
[
start
,
end
])
}
}
,
{
text
:
'
最近三个月
'
,
onClick
(
picker
)
{
const
end
=
new
Date
()
const
start
=
new
Date
()
start
.
setTime
(
start
.
getTime
()
-
3600
*
1000
*
24
*
90
)
picker
.
$emit
(
'
pick
'
,
[
start
,
end
])
}
}
]
}
,
itemImages
:
[],
rules
:
{
backgroundImage
:
[{
required
:
true
,
message
:
'
至少一张图片
'
,
trigger
:
'
blur
'
}
],
title
:
[{
required
:
true
,
message
:
'
专场标题不能为空
'
,
trigger
:
'
blur
'
}
],
startTime
:
[{
required
:
true
,
message
:
'
时间不能为空
'
,
trigger
:
'
blur
'
}
]
}
}
}
,
computed
:
{
headers
()
{
return
{
'
X-Dts-Admin-Token
'
:
getToken
()
}
}
}
,
created
()
{
if
(
this
.
$route
.
query
.
id
==
null
)
{
return
}
this
.
id
=
this
.
$route
.
query
.
id
this
.
timeStr
=
this
.
$route
.
query
.
timeStr
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
}
)
this
.
handleGetDetail
(
loading
)
this
.
getList
()
}
,
methods
:
{
handleSetTime
(
value
)
{
console
.
log
(
'
====
'
,
value
)
if
(
!
value
)
{
return
}
this
.
goods
.
startTime
=
this
.
specialTime
[
0
]
this
.
goods
.
endTime
=
this
.
specialTime
[
1
]
}
,
previewImg
(
url
)
{
window
.
open
(
url
,
'
_blank
'
)
}
,
removeImg
(
url
)
{
this
.
goods
.
backgroundImage
=
''
this
.
itemImages
=
[]
}
,
handlerNumTypeChange
(
e
)
{
console
.
log
(
'
==e==
'
,
e
)
}
,
/**
* 获取详情
* @param loading
*/
handleGetDetail
(
loading
)
{
specialDetail
({
specialPerformanceId
:
this
.
id
}
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
console
.
log
(
'
====
'
,
response
.
data
.
data
)
if
(
response
.
data
.
data
)
{
this
.
goods
=
response
.
data
.
data
const
list
=
[]
if
(
this
.
goods
.
backgroundImage
)
{
list
.
push
({
url
:
this
.
goods
.
backgroundImage
}
)
}
this
.
itemImages
=
list
this
.
specialTime
=
[
this
.
goods
.
startTime
,
this
.
goods
.
endTime
]
console
.
log
(
'
==itemImages==
'
,
this
.
itemImages
)
}
}
)
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
}
)
}
,
/**
* 返回
*/
handleBack
()
{
if
(
this
.
$route
.
query
.
noGoBack
)
{
this
.
$router
.
push
({
path
:
'
/dashboard
'
}
)
}
else
{
this
.
$router
.
go
(
-
1
)
}
}
,
/**
* 保存
*/
handleSave
()
{
if
(
!
this
.
goods
.
backgroundImage
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
最少上传1张背景图片!
'
}
)
return
}
if
(
!
this
.
specialTime
)
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
请选择时间
'
}
)
return
}
this
.
goods
.
startTime
=
this
.
specialTime
[
0
]
this
.
goods
.
endTime
=
this
.
specialTime
[
1
]
this
.
$refs
.
goods
.
validate
((
valid
)
=>
{
if
(
valid
)
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
}
)
if
(
this
.
id
)
{
this
.
goods
.
specialPerformanceId
=
this
.
id
updateSpecial
(
this
.
goods
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
编辑成功
'
}
)
this
.
$router
.
push
({
path
:
'
/sale/specialList
'
}
)
}
)
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
goods
.
backgroundImage
=
''
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
}
)
}
)
}
else
{
addSpecial
(
this
.
goods
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
新增成功
'
}
)
this
.
id
=
response
.
data
.
data
.
specialPerformanceId
this
.
goods
.
id
=
response
.
data
.
data
.
specialPerformanceId
console
.
log
(
'
==specialPerformanceId==
'
,
response
.
data
.
data
.
specialPerformanceId
)
}
)
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
this
.
goods
.
backgroundImage
=
''
MessageBox
.
alert
(
'
业务错误:
'
+
response
.
data
.
errmsg
||
'
请求失败,请重试
'
,
'
警告
'
,
{
confirmButtonText
:
'
确定
'
,
type
:
'
error
'
}
)
}
)
}
}
}
)
}
,
/**
* 添加拍品
* @param value
*/
handleAdd
()
{
this
.
isShowAddSpecialDialog
=
true
}
,
uploadOverrun
:
function
()
{
this
.
$message
({
type
:
'
error
'
,
message
:
'
上传文件个数超出限制!最多上传1张图片!
'
}
)
}
,
handleGalleryUrl
(
response
,
file
,
fileList
)
{
if
(
response
.
errno
===
0
)
{
// this.goods.images.push(response.data.url)
this
.
goods
.
backgroundImage
=
response
.
data
.
url
}
}
,
handleRemove
:
function
(
file
,
fileList
)
{
this
.
goods
.
backgroundImage
=
''
}
,
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
getList
()
{
if
(
!
this
.
id
)
{
return
}
this
.
listLoading
=
true
this
.
listQuery
.
specialPerformanceId
=
this
.
id
findSpecialListById
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
,
handleDeleteSpecialItem
(
row
)
{
this
.
$confirm
(
'
是否将该藏品删除?
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
const
params
=
{
specialPerformanceId
:
this
.
id
,
itemId
:
row
.
id
}
deleteSpecialItem
(
params
).
then
(
response
=>
{
this
.
list
=
this
.
list
.
filter
((
item
)
=>
{
if
(
item
.
id
!==
row
.
id
)
{
return
item
}
}
)
this
.
$notify
.
success
({
message
:
'
删除成功
'
}
)
}
).
catch
((
e
)
=>
{
console
.
log
(
'
===报错=
'
,
e
)
this
.
$message
.
error
(
e
.
data
&&
e
.
data
.
errmsg
||
'
请求失败, 请重试
'
)
}
)
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
box
-
card
{
margin
:
24
px
;
}
.
item
{
display
:
flex
;
}
.
op
-
container
{
display
:
flex
;
justify
-
content
:
right
;
padding
:
24
px
24
px
0
;
}
.
op
-
add
{
display
:
flex
;
justify
-
content
:
space
-
between
;
align
-
content
:
baseline
;
padding
-
bottom
:
24
px
;
.
item_num
{
font
-
weight
:
600
;
padding
-
top
:
15
px
;
}
}
.
add_auction
{
margin
-
left
:
auto
;
}
/deep/
.
el
-
form
-
item__content
{
margin
-
left
:
0
;
}
/deep/
.
syllable_ul
{
width
:
100
%
;
display
:
flex
;
flex
-
direction
:
row
;
flex
-
wrap
:
wrap
;
}
/deep/
.
el
-
icon
-
delete
{
color
:
white
;
}
.
ant
-
upload
-
list
{
display
:
flex
;
flex
-
direction
:
row
;
}
.
image_preview
{
width
:
90
px
;
height
:
60
px
;
align
-
content
:
center
;
justify
-
content
:
center
;
display
:
flex
;
.
table
-
td
-
thumb
{
width
:
60
px
;
height
:
60
px
;
}
}
.
ant
-
upload
-
list
-
item
{
display
:
flex
;
flex
-
direction
:
row
;
width
:
146
px
;
height
:
146
px
;
margin
:
0
12
px
12
px
0
;
.
ant
-
upload
-
list
-
item
-
info
{
position
:
relative
;
}
.
ant
-
upload
-
list
-
item
-
actions
{
width
:
146
px
;
height
:
30
px
;
position
:
absolute
;
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
center
;
align
-
items
:
center
;
top
:
0
;
margin
-
top
:
136
px
;
background
:
rgba
(
0
,
0
,
0
,
0.5
);
border
-
radius
:
0
0
12
px
12
px
;
}
.
ant
-
upload
-
list
-
item
-
thumbnail
{
width
:
146
px
;
height
:
146
px
;
border
-
radius
:
12
px
;
}
}
<
/style
>
src/views/sale/specialDetail.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<div
class=
"page_itemDetail"
>
<el-card
class=
"box-card"
style=
"margin: 16px"
>
<div
class=
"user_info flex"
>
<el-form
ref=
"addInviteRef"
label-width=
"120px"
>
<el-form-item
label=
"专场标题:"
>
<div>
{{
itemContent
&&
itemContent
.
title
||
'
-
'
}}
</div>
</el-form-item>
<el-form-item
label=
"时间:"
>
<div>
{{
`${itemContent.startTime || '-'
}
至 ${itemContent.endTime || '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
商品图片/视频:
"
>
<
div
v
-
if
=
"
itemContent && itemContent.imageList
"
class
=
"
image
"
>
<
div
v
-
for
=
"
item in itemContent.imageList
"
:
key
=
"
item.url
"
class
=
"
image_item
"
@
click
=
"
handleShowLargeDialog(item.type, item.url, item.videoUrl)
"
>
<
img
:
src
=
"
item.url
"
class
=
"
image_item_content
"
>
<
img
v
-
if
=
"
item.type === 1
"
class
=
"
image_content_video_icon
"
src
=
"
https://cdn.wanwudezhi.com/static/web-static/image/10651432d8c28651da81753c260d81b3_120x120.png
"
>
<
/div
>
<
/div
>
<
/el-form-item
>
<
/el-form
>
<
/div
>
<
/el-card
>
<
el
-
card
v
-
if
=
"
id
"
class
=
"
box-card
"
>
<
div
class
=
"
op-add
"
>
<
div
class
=
"
item_num
"
>
{{
`${total > 0 ? `
共计
$
{
total
}件藏品
` : ''
}
`
}}
<
/div
>
<
/div
>
<
el
-
table
v
-
loading
=
"
listLoading
"
:
data
=
"
list
"
size
=
"
small
"
element
-
loading
-
text
=
"
正在查询中...
"
border
fit
height
=
"
600
"
highlight
-
current
-
row
>
<
el
-
table
-
column
align
=
"
center
"
min
-
width
=
"
100px
"
prop
=
"
id
"
label
=
"
拍卖ID
"
fixed
=
"
left
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
拍品图片
"
prop
=
"
itemImg
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
class
=
"
image_preview
"
>
<
el
-
image
:
preview
-
src
-
list
=
"
scope.row.images.split(';')
"
:
src
=
"
scope.row.images.split(';')[0]
"
class
=
"
table-td-thumb
"
/>
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
拍卖标题
"
min
-
width
=
"
150px
"
prop
=
"
name
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
Line2Hidden
:
text
=
"
scope.row.name
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
起拍价
"
prop
=
"
startPrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.startPrice ? `
¥
$
{
scope
.
row
.
startPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
加价幅度
"
prop
=
"
addExtent
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.addExtent ? `
¥
$
{
scope
.
row
.
addExtent
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
理想价格
"
prop
=
"
distributionPrice
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.distributionPrice ? `
¥
$
{
scope
.
row
.
distributionPrice
}
` : '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
发布者
"
prop
=
"
creatorName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
状态
"
prop
=
"
auctionStateName
"
width
=
"
100
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
class
=
"
tooltip-span
"
>
{{
`${scope.row.auctionStateName || '-'
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
if
=
"
total > 0
"
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/el-card
>
<
CheckLargeImageDialog
:
show
-
large
-
dialog
=
"
showLargeDialog
"
:
image
-
url
=
"
imageUrl
"
@
closeLargeDialog
=
"
showLargeDialog = false
"
/>
<
CheckVideoDialog
:
show
-
video
-
dialog
=
"
showVideoDialog
"
:
video
-
url
=
"
videosUrl
"
@
closeLargeDialog
=
"
showVideoDialog = false
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
findSpecialListById
,
specialDetail
}
from
'
../../api/business/sale
'
import
CheckLargeImageDialog
from
'
../goods/components/CheckLargeImageDialog
'
import
CheckVideoDialog
from
'
../goods/components/CheckVideoDialog
'
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
export
default
{
name
:
'
SpecialDetail
'
,
components
:
{
CheckVideoDialog
,
CheckLargeImageDialog
,
Line2Hidden
,
Pagination
}
,
data
()
{
return
{
id
:
''
,
itemContent
:
{
imageList
:
[]
}
,
imageUrl
:
''
,
showLargeDialog
:
false
,
showVideoDialog
:
false
,
videosUrl
:
''
,
listLoading
:
false
,
listQuery
:
{
page
:
1
,
limit
:
20
}
,
list
:
[],
total
:
0
}
}
,
created
()
{
if
(
this
.
$route
.
query
.
id
==
null
)
{
return
}
this
.
id
=
this
.
$route
.
query
.
id
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
Loading
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
}
)
this
.
handleGetDetail
(
loading
)
this
.
getList
()
}
,
methods
:
{
/**
* 获取详情
* @param loading
*/
handleGetDetail
(
loading
)
{
specialDetail
({
specialPerformanceId
:
this
.
id
}
)
.
then
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
console
.
log
(
'
====
'
,
response
.
data
.
data
)
if
(
response
.
data
.
data
)
{
this
.
itemContent
=
response
.
data
.
data
const
list
=
[]
list
.
push
({
url
:
this
.
itemContent
.
backgroundImage
,
videoUrl
:
''
,
type
:
2
}
)
this
.
itemContent
.
imageList
=
list
}
}
)
.
catch
(
response
=>
{
if
(
loading
)
{
loading
.
close
()
}
}
)
}
,
/**
* 展示大图
* @param imageUrl
*/
handleShowLargeDialog
(
type
,
imageUrl
,
videoUrl
)
{
if
(
type
===
1
)
{
this
.
videosUrl
=
videoUrl
this
.
showVideoDialog
=
true
}
else
{
this
.
imageUrl
=
imageUrl
this
.
showLargeDialog
=
true
}
}
,
getList
()
{
if
(
!
this
.
id
)
{
return
}
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
this
.
listQuery
.
specialPerformanceId
=
this
.
id
findSpecialListById
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
.
page_itemDetail
{
padding
:
20
px
;
.
image_preview
{
width
:
90
px
;
height
:
60
px
;
align
-
content
:
center
;
justify
-
content
:
center
;
display
:
flex
;
.
table
-
td
-
thumb
{
width
:
60
px
;
height
:
60
px
;
}
}
.
op
-
add
{
display
:
flex
;
justify
-
content
:
space
-
between
;
align
-
content
:
baseline
;
padding
-
bottom
:
24
px
;
.
item_num
{
font
-
weight
:
600
;
padding
-
top
:
15
px
;
}
}
.
image
{
width
:
100
%
;
display
:
flex
;
flex
-
direction
:
row
;
}
.
image_item
{
width
:
100
px
;
height
:
100
px
;
margin
-
right
:
10
px
;
margin
-
top
:
16
px
;
position
:
relative
;
.
image_item_content
{
width
:
100
px
;
height
:
100
px
;
}
.
image_content_video_icon
{
position
:
absolute
;
width
:
30
px
;
height
:
30
px
;
top
:
10
px
;
left
:
10
px
;
}
}
}
/deep/
.
el
-
form
-
item
{
margin
-
bottom
:
0
}
<
/style
>
src/views/sale/specialList.vue
0 → 100644
View file @
2bcb8eee
<
template
>
<div
class=
"page_consignList"
>
<div
class=
"filter-container"
>
<div
class=
"button_left"
/>
<el-button
size=
"mini"
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
新增专场
</el-button>
</div>
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"专场标题"
min-width=
"150px"
prop=
"title"
>
<template
slot-scope=
"scope"
>
<Line2Hidden
:text=
"scope.row.title"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"竞拍时间"
prop=
"updateTime"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<span>
{{
`${scope.row.startTime
}
至 ${scope.row.endTime
}
`
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
藏品数
"
prop
=
"
itemNum
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
状态
"
prop
=
"
stateName
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
出价次数
"
prop
=
"
offerNum
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
更新时间
"
prop
=
"
updateTime
"
/>
<
el
-
table
-
column
align
=
"
center
"
label
=
"
操作
"
width
=
"
300
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToDetail(scope.row)
"
>
详情
<
/el-button
>
<
el
-
button
:
disabled
=
"
(scope.row.state === 2)
"
type
=
"
primary
"
size
=
"
mini
"
@
click
=
"
handleToEdit(scope.row)
"
>
编辑
<
/el-button
>
<
el
-
button
:
disabled
=
"
(scope.row.state === 2)
"
type
=
"
danger
"
size
=
"
mini
"
@
click
=
"
handleDelete(scope.row)
"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
Pagination
v
-
show
=
"
total>0
"
:
total
=
"
total
"
:
page
.
sync
=
"
listQuery.page
"
:
limit
.
sync
=
"
listQuery.limit
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
Line2Hidden
from
'
@/components/line2Hidden
'
import
Pagination
from
'
@/components/Pagination
'
import
{
findSpecialList
,
deleteSpecial
}
from
'
@/api/business/sale
'
export
default
{
name
:
'
SaleList
'
,
components
:
{
Pagination
,
Line2Hidden
}
,
data
()
{
return
{
itemKey
:
0
,
options
:
[{
value
:
1
,
label
:
'
上架
'
}
,
{
value
:
0
,
label
:
'
下架
'
}
],
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
}
,
list
:
[],
total
:
0
,
// 图文估价
imageValueDialogShow
:
false
,
// 建议寄售价
identifyValueDialogShow
:
false
,
// 货品售出
finishDialogShow
:
false
,
// 寄售凭证
finishSettlementDialogShow
:
false
,
// 取消
cancelConsignDialogShow
:
false
,
currentSaleId
:
''
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleReset
()
{
this
.
listQuery
=
{
page
:
1
,
limit
:
20
}
this
.
getList
()
}
,
handleCreate
()
{
this
.
$router
.
push
({
path
:
'
/sale/specialAdd
'
}
)
}
,
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
handleClick
(
tab
,
event
)
{
this
.
listQuery
.
page
=
1
this
.
getList
()
}
,
getList
()
{
localStorage
.
setItem
(
'
systemState
'
,
''
)
this
.
listLoading
=
true
findSpecialList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}
).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
}
)
}
,
/**
* 详情
*/
handleToDetail
(
item
)
{
this
.
$router
.
push
({
path
:
'
/sale/specialDetail
'
,
query
:
{
id
:
item
.
id
}}
)
}
,
/**
* 编辑
*/
handleToEdit
(
item
)
{
this
.
$router
.
push
({
path
:
'
/sale/specialAdd
'
,
query
:
{
id
:
item
.
id
}}
)
}
,
/**
* 删除
*/
handleDelete
(
item
)
{
this
.
$confirm
(
'
确定要删除该专场吗?删除后不可恢复。
'
,
'
提示
'
,
{
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
const
data
=
{
specialPerformanceId
:
item
.
id
}
deleteSpecial
(
data
).
then
((
res
)
=>
{
this
.
$notify
.
success
({
title
:
'
成功
'
,
message
:
'
删除成功
'
}
)
this
.
getList
()
}
).
catch
(
err
=>
{
this
.
$notify
.
error
({
title
:
'
失败
'
,
message
:
err
.
data
.
errmsg
}
)
}
)
}
)
}
}
}
<
/script
>
<
style
lang
=
"
scss
"
scoped
>
/deep/
.
el
-
switch
{
height
:
30
px
;
}
/deep/
.
cell
{
display
:
flex
;
justify
-
content
:
center
;
}
.
page_consignList
{
padding
:
20
px
;
.
filter
-
container
{
display
:
flex
;
flex
-
direction
:
row
;
justify
-
content
:
space
-
between
;
}
.
image_preview
{
width
:
90
px
;
height
:
60
px
;
align
-
content
:
center
;
justify
-
content
:
center
;
display
:
flex
;
.
table
-
td
-
thumb
{
width
:
60
px
;
height
:
60
px
;
}
}
}
<
/style
>
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