Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sensorConsult
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglw
sensorConsult
Commits
8b70f765
Commit
8b70f765
authored
Jun 09, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品更新
parent
c760d154
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1075 additions
and
39 deletions
+1075
-39
common.js
src/api/common.js
+30
-0
index.vue
src/views/backstage/customMgt/customTabulate/index.vue
+1
-1
add.vue
src/views/backstage/productMgt/productTabulate/add.vue
+25
-9
edit.vue
src/views/backstage/productMgt/productTabulate/edit.vue
+581
-0
index.vue
src/views/backstage/productMgt/productTabulate/index.vue
+36
-29
view.vue
src/views/backstage/productMgt/productTabulate/view.vue
+402
-0
No files found.
src/api/common.js
View file @
8b70f765
...
...
@@ -110,6 +110,12 @@ export const HttpReq = {
method
:
'
get
'
})
},
checkEnterpriseName
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/checkEnterpriseName?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 添加产品详情
addProduct
:
function
(
data
)
{
return
request
({
...
...
@@ -120,6 +126,30 @@ export const HttpReq = {
return
res
})
},
// 更新产品详情
updateProductDetail
:
function
(
data
)
{
return
request
({
url
:
'
/api/bsw/product/updateProductDetail
'
,
method
:
'
put
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 查询产品列表
queryProduct
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/queryProduct?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
// 查询产品详情
queryProductDetail
:
function
(
params
)
{
return
request
({
url
:
'
/api/bsw/product/queryProductDetail?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
xxx
:
null
}
}
...
...
src/views/backstage/customMgt/customTabulate/index.vue
View file @
8b70f765
...
...
@@ -31,7 +31,7 @@
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
prop=
"userName"
label=
"用户名"
/>
<el-table-column
prop=
"registeredAddressProvince"
label=
"区域"
:formatter=
"(row, col
umn, cellValue)=>
{return dict.label.area_province[cellValue
]}" />
<el-table-column
prop=
"registeredAddressProvince"
label=
"区域"
:formatter=
"(row, col
, val)=>
{return dict.label.area_province[val
]}" />
<el-table-column
prop=
"enterpriseName"
label=
"企业名称"
/>
<el-table-column
prop=
"enterpriseContactPerson"
label=
"联系人"
/>
<el-table-column
prop=
"enterpriseContactPersonPhone"
label=
"联系电话"
/>
...
...
src/views/backstage/productMgt/productTabulate/add.vue
View file @
8b70f765
...
...
@@ -2,10 +2,10 @@
<!-- 表单渲染 -->
<el-dialog
append-to-body
:close-on-click-modal=
"false"
:before-close=
"cancelView"
:visible=
"visible"
:title=
"title"
width=
"1080px"
>
<el-form
ref=
"formViewRef"
:model=
"formData"
:rules=
"rules"
:status-icon=
"true"
label-width=
"240px"
>
<el-form-item
label=
"供应商名称:"
class=
"form-cell"
prop=
"
customer
Name"
>
<el-form-item
label=
"供应商名称:"
class=
"form-cell"
prop=
"
enterprise
Name"
>
<div
class=
"cell-box"
>
<el-autocomplete
v-model=
"formData.
customer
Name"
v-model=
"formData.
enterprise
Name"
class=
"cell-input"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入供应商名称"
...
...
@@ -213,7 +213,7 @@
</el-form-item>
<el-form-item
label=
"交易保障承诺:"
class=
"form-cell"
prop=
"letterOfCommitment"
>
<div
class=
"cell-box"
>
<el-checkbox
v-model=
"formData.letterOfCommitment"
><em>
卖家承诺履约
诈合规
骗包赔,保障产品交易安全
</em></el-checkbox>
<el-checkbox
v-model=
"formData.letterOfCommitment"
><em>
卖家承诺履约
合规诈
骗包赔,保障产品交易安全
</em></el-checkbox>
</div>
</el-form-item>
</el-form>
...
...
@@ -258,7 +258,7 @@ export default {
dialogImageVisible
:
false
,
visible
:
false
,
tagTypes
:
[
''
,
'
primary
'
,
'
success
'
,
'
warning
'
,
'
danger
'
,
'
info
'
,
'
info
'
,
'
info
'
],
title
:
'
产品信息详情
'
,
title
:
'
添加
产品信息详情
'
,
productSubTypeOpts
:
[],
inputVisible
:
false
,
inputValue
:
''
,
...
...
@@ -266,9 +266,9 @@ export default {
formData
:
{
productId
:
null
,
customerId
:
null
,
// 供应商id
customer
Name
:
''
,
// 供应商名称
enterprise
Name
:
''
,
// 供应商名称
productName
:
''
,
// 产品名称
productType
:
null
,
// 产品大类
productType
:
'
1
'
,
// 产品大类
productSubType
:
null
,
// 产品小类
minPrice
:
null
,
// 价格区间-小
maxPrice
:
null
,
// 价格区间-大
...
...
@@ -294,12 +294,12 @@ export default {
rank
:
'
1
'
// 产品品级
},
rules
:
{
// customerName: { required: true, message: '请填写供应商名称', trigger: 'blur' },
// productName: { required: true, message: '请填写产品名称', trigger: 'blur' },
// productType: { required: true, message: '请选择产品分类', trigger: 'blur' },
// productPic: { required: true, message: '请上传产品图片', trigger: 'blur' },
// productDescribe: { required: true, message: '请填写产品概述', trigger: 'blur' },
// letterOfCommitment: { required: true, message: '请勾选交易保障承诺', trigger: 'blur' },
enterpriseName
:
{
validator
:
this
.
checkEnterpriseName
,
trigger
:
'
blur
'
},
minPrice
:
[
// { required: true, message: '请填写产品价格区间下限', trigger: 'blur' },
{
validator
:
checkPrice
,
trigger
:
'
blur
'
}
...
...
@@ -318,9 +318,22 @@ export default {
])
},
mounted
()
{
this
.
productSubTypeOpts
=
this
.
dict
[
'
product_type_1
'
]
},
methods
:
{
checkEnterpriseName
(
rule
,
value
,
callback
)
{
this
.
$nextTick
(
_
=>
{
HttpReq
.
backstageApi
.
checkEnterpriseName
({
name
:
value
,
id
:
this
.
formData
.
customerId
}).
then
((
res
)
=>
{
if
(
res
.
data
)
{
callback
()
}
else
{
callback
(
new
Error
(
res
.
msg
))
}
})
})
},
querySearch
(
queryString
,
cb
)
{
HttpReq
.
backstageApi
.
associateQueryEnterpriseName
({
name
:
queryString
...
...
@@ -330,6 +343,9 @@ export default {
},
handleSelect
(
item
)
{
this
.
formData
.
customerId
=
item
.
id
this
.
$refs
.
formViewRef
.
validateField
(
'
enterpriseName
'
,
valid
=>
{
return
valid
})
},
handleClose
(
tag
)
{
this
.
productFeature
.
splice
(
this
.
productFeature
.
indexOf
(
tag
),
1
)
...
...
@@ -395,7 +411,7 @@ export default {
this
.
$refs
.
uploadCom
.
clearFiles
()
this
.
$refs
.
formViewRef
.
resetFields
()
this
.
editor
.
txt
.
clear
()
this
.
productSubTypeOpts
=
[
]
this
.
productSubTypeOpts
=
this
.
dict
[
'
product_type_1
'
]
this
.
productFeature
=
[]
this
.
visible
=
false
},
...
...
src/views/backstage/productMgt/productTabulate/edit.vue
0 → 100644
View file @
8b70f765
This diff is collapsed.
Click to expand it.
src/views/backstage/productMgt/productTabulate/index.vue
View file @
8b70f765
...
...
@@ -2,15 +2,15 @@
<div
class=
"app-container"
>
<!--工具栏-->
<div
class=
"head-container"
>
<el-input
v-model=
"query.
username
"
clearable
placeholder=
"请输入产品ID"
style=
"width:150px;"
/>
<el-input
v-model=
"query.
usern
ame"
clearable
placeholder=
"请输入产品名称"
style=
"width:280px;"
/>
<el-select
v-model=
"query.
area
"
clearable
placeholder=
"请选择分类"
style=
"width: 150px"
>
<el-input
v-model=
"query.
productId
"
clearable
placeholder=
"请输入产品ID"
style=
"width:150px;"
/>
<el-input
v-model=
"query.
productN
ame"
clearable
placeholder=
"请输入产品名称"
style=
"width:280px;"
/>
<el-select
v-model=
"query.
productType
"
clearable
placeholder=
"请选择分类"
style=
"width: 150px"
>
<el-option
v-for=
"item in dict.product_type"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-select
v-model=
"query.status"
clearable
placeholder=
"请选择状态"
style=
"width: 150px"
>
<el-option
v-for=
"item in dict.product_status"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<date-range-picker
v-model=
"query.
cre
ateTime"
start-placeholder=
"最后维护开始日期"
style=
"width: 320px"
/>
<date-range-picker
v-model=
"query.
upd
ateTime"
start-placeholder=
"最后维护开始日期"
style=
"width: 320px"
/>
<el-button
type=
"success"
icon=
"el-icon-search"
@
click=
"toSearch"
>
搜索
</el-button>
<el-button
type=
"warning"
icon=
"el-icon-refresh"
@
click=
"clearLimit"
>
重置
</el-button>
</div>
...
...
@@ -28,37 +28,42 @@
<el-table
id=
"dataTable"
ref=
"dataTable"
v-loading=
"loading"
:data=
"tableData"
tooltip-effect=
"dark"
style=
"width:auto;min-height: 70vh"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
:index=
"indexMethod"
/>
<el-table-column
prop=
"
username"
label=
"产品ID"
width=
"14
0"
/>
<el-table-column
prop=
"
area"
label=
"产品分类
"
/>
<el-table-column
prop=
"
xxx
"
label=
"产品名称"
/>
<el-table-column
prop=
"
productId"
label=
"产品ID"
width=
"10
0"
/>
<el-table-column
prop=
"
productType"
label=
"产品分类"
width=
"140"
:formatter=
"(row, col, val)=>
{return dict.label.product_type[val]}
" />
<el-table-column
prop=
"
productName
"
label=
"产品名称"
/>
<el-table-column
label=
"状态"
width=
"100"
>
<template
slot-scope=
"scope"
>
<div
:style=
"'color:'+textColors[scope.row.status]"
>
{{
dict
.
label
.
product_status
[
scope
.
row
.
status
]
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"
xxx"
label=
"最后维护日期"
align=
"center"
width=
"10
0"
/>
<el-table-column
prop=
"xxx"
label=
"操作"
align=
"right"
width=
"200"
>
<el-table-column
prop=
"
updateTime"
label=
"最后维护日期"
align=
"center"
width=
"18
0"
/>
<el-table-column
label=
"操作"
align=
"right"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
v-show=
"scope.row.status==3"
content=
"审核"
><el-button
round
plain
type=
"warning"
icon=
"el-icon-s-check"
@
click=
"to
Edit(scope.row
)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==3"
content=
"审核"
><el-button
round
plain
type=
"warning"
icon=
"el-icon-s-check"
@
click=
"to
View(scope.row, true
)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==4"
content=
"发布"
><el-button
round
plain
type=
"success"
icon=
"el-icon-finished"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status==5"
content=
"下架"
><el-button
round
plain
type=
"danger"
icon=
"el-icon-download"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
v-show=
"scope.row.status>=4"
content=
"编辑"
><el-button
round
plain
type=
"primary"
icon=
"el-icon-edit-outline"
@
click=
"toEdit(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"查看"
><el-button
round
plain
icon=
"el-icon-view"
@
click=
"to
Edit
(scope.row)"
/></el-tooltip>
<el-tooltip
content=
"查看"
><el-button
round
plain
icon=
"el-icon-view"
@
click=
"to
View
(scope.row)"
/></el-tooltip>
</
template
>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total=
"total"
:current-page=
"page"
:page-size=
"pageSize"
style=
"margin-top: 8px;"
layout=
"total, prev, pager, next, sizes"
@
size-change=
"sizeChange"
@
current-change=
"pageChange"
/>
</div>
<add-view
ref=
"addView"
/>
<add-page
ref=
"addPage"
/>
<edit-page
ref=
"editPage"
/>
<view-page
ref=
"viewPage"
/>
</div>
</template>
<
script
>
import
{
HttpReq
}
from
'
@/api/common
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
AddView
from
'
./add
'
import
addPage
from
'
./add
'
import
editPage
from
'
./edit
'
import
viewPage
from
'
./view
'
export
default
{
components
:
{
DateRangePicker
,
AddView
},
components
:
{
DateRangePicker
,
addPage
,
editPage
,
viewPage
},
dicts
:
[
'
product_type
'
,
'
product_status
'
],
data
()
{
return
{
...
...
@@ -88,19 +93,18 @@ export default {
this
.
multipleSelection
=
val
},
loadData
()
{
var
sort
=
'
id,desc
'
var
param
=
{
...
this
.
query
}
param
.
page
=
this
.
page
param
.
pageSize
=
this
.
pageSize
param
.
sort
=
sort
this
.
tableData
=
[
{
username
:
'
张三
'
,
area
:
'
火星
'
,
status
:
2
,
enabled
:
false
,
xxx
:
'
2023-05-09
'
},
{
username
:
'
张三
'
,
area
:
'
火星
'
,
status
:
3
,
enabled
:
false
,
xxx
:
'
2023-05-09
'
},
{
username
:
'
张三
'
,
area
:
'
火星
'
,
status
:
4
,
enabled
:
false
,
xxx
:
'
2023-05-09
'
},
{
username
:
'
李四
'
,
area
:
'
地球
'
,
status
:
5
,
enabled
:
true
,
xxx
:
'
2023-05-09
'
},
{
username
:
'
张三
'
,
area
:
'
火星
'
,
status
:
6
,
enabled
:
false
,
xxx
:
'
2023-05-09
'
}
]
this
.
total
=
2
// 清除参数无值的情况
Object
.
keys
(
this
.
query
).
length
!==
0
&&
Object
.
keys
(
this
.
query
).
forEach
(
item
=>
{
if
(
this
.
query
[
item
]
===
null
||
this
.
query
[
item
]
===
''
)
this
.
query
[
item
]
=
undefined
})
HttpReq
.
backstageApi
.
queryProduct
({
page
:
this
.
page
-
1
,
pageSize
:
this
.
pageSize
,
...
this
.
query
}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
data
this
.
total
=
res
.
data
.
total
})
},
batchOperate
(
opt
)
{
if
(
!
this
.
multipleSelection
.
length
)
{
...
...
@@ -127,10 +131,13 @@ export default {
})
},
toAdd
()
{
this
.
$refs
.
add
View
.
loadData
()
this
.
$refs
.
add
Page
.
loadData
()
},
toEdit
(
item
)
{
this
.
$refs
.
editPage
.
loadData
(
item
.
productId
)
},
toView
(
item
,
isReview
)
{
this
.
$refs
.
viewPage
.
loadData
(
item
.
productId
,
isReview
)
},
toSearch
()
{
this
.
page
=
1
...
...
src/views/backstage/productMgt/productTabulate/view.vue
0 → 100644
View file @
8b70f765
This diff is collapsed.
Click to expand it.
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