Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 69f49ab7
authored
Nov 10, 2020
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
产品管理,4s服务店
1 parent
6922514c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
350 additions
and
13 deletions
src/views/goods/product.vue
src/views/systemConfig/serviceStore.vue
src/views/goods/product.vue
View file @
69f49ab
<!-- 产品管理 -->
<!-- 产品管理 -->
<
template
>
<
template
>
<div></div>
<d2-container
class=
"commodity"
>
<el-form
:inline=
"true"
v-model=
"searchForm"
label-width=
"85px"
slot=
"header"
>
<el-form-item
label=
"产品名称"
>
<el-input
v-model=
"searchForm.name"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"分类"
>
<el-select
v-model=
"searchForm.class1"
placeholder=
"请选择产品分类1"
>
<el-option
v-for=
"item in baseData.product1"
:key=
"item.confId"
:label=
"item.confKey"
:value=
"item.confId"
></el-option>
</el-select>
<el-select
v-model=
"searchForm.class2"
placeholder=
"请选择产品分类2"
>
<el-option
v-for=
"item in baseData.product2"
:key=
"item.confId"
:label=
"item.confKey"
:value=
"item.confId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"品牌商"
>
<el-select
v-model=
"searchForm.brandName"
placeholder=
"请选择品牌商"
>
<el-option
v-for=
"item in baseData.brandList"
:key=
"item.confId"
:label=
"item.confKey"
:value=
"item.confId"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
:id=
"tableParams.btnId"
type=
"primary"
icon=
"el-icon-search"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<d2-table-header>
<auth-button
category=
"Button"
:data=
"editFormReset"
></auth-button>
</d2-table-header>
<d2-table
ref=
"productTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<img
slot=
"img"
slot-scope=
"scope"
class=
"pro-img"
:src=
"scope.scope.img"
/>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
></auth-button>
<!--
<el-button
v-else
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
type=
"text"
@
click=
"handleUpOrDown"
>
{{
scope
.
scope
.
state
?
'上架'
:
'下架'
}}
</el-button>
-->
</d2-table>
<!--
<d2-dialog
title=
"关联门店信息"
:className=
"storeDetail"
:isVisible
.
sync=
"detailVisible"
@
closeDialog=
"handleDetailClose"
>
<store-detail
:detail=
"detailData"
></store-detail>
</d2-dialog>
-->
</d2-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getList
}
from
'@api/product'
// import storeDetail from './storeDetail'
export
default
{
export
default
{
name
:
'product'
,
name
:
'product'
,
data
()
{
data
()
{
return
{
return
{
searchForm
:
{
name
:
''
,
class1
:
''
,
class2
:
''
,
brandName
:
''
},
editFormReset
:
{
aa
:
''
},
getListApi
:
getList
,
// 表格参数
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'缩略图'
,
prop
:
'img'
,
addHtml
:
'img'
},
{
label
:
'素材名称'
,
prop
:
'name'
},
{
label
:
'商品ID'
,
prop
:
'code'
},
{
label
:
'分类'
,
prop
:
'class'
},
{
label
:
'品牌商'
,
prop
:
'brandName'
},
{
label
:
'创建时间'
,
prop
:
'createTime'
},
{
label
:
'产品状态'
,
prop
:
'state'
,
formatter
:
(
cellValue
)
=>
{
return
{
0
:
'上架'
,
1
:
'下架'
}[
cellValue
.
state
]
}
}]
},
// 查看门店
detailVisible
:
false
,
// 基本数据
baseData
:
{
product1
:
[{
confId
:
1
,
confKey
:
'分类1'
}],
product2
:
[{
confId
:
1
,
confKey
:
'分类2'
}],
brandList
:
[]
}
}
}
},
},
components
:
{
},
components
:
{
// storeDetail
computed
:
{
},
},
mounted
()
{},
mounted
()
{
// console.log(storeDetail)
// var allOpt = { confId: '', confKey: '全部' }
// this.baseData.product.unshift(allOpt)
// this.baseData.brandList.unshift(allOpt)
},
methods
:
{}
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
console
.
log
(
'搜索前操作--'
)
resolve
()
})
},
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
},
handleReset
()
{
this
.
$refs
.
productTable
.
refreshTable
()
},
handleAdd
(
form
)
{
console
.
log
(
form
)
},
handleExport
()
{
},
handleEdit
(
row
)
{
console
.
log
(
row
)
},
handleDetail
(
row
)
{
this
.
detailData
=
row
this
.
detailVisible
=
true
},
handleDetailClose
()
{
this
.
detailVisible
=
false
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.commodity
.pro-img
{
width
:
50px
;
height
:
50px
;
}
</
style
>
</
style
>
src/views/systemConfig/serviceStore.vue
View file @
69f49ab
<!-- 服务4
s
店 -->
<!-- 服务4
S
店 -->
<
template
>
<
template
>
<div></div>
<d2-container
class=
"commodity"
>
<el-form
:inline=
"true"
v-model=
"searchForm"
label-width=
"85px"
slot=
"header"
>
<el-form-item
label=
"商品名称"
>
<el-input
v-model=
"searchForm.name"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button
:id=
"tableParams.btnId"
type=
"primary"
icon=
"el-icon-search"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<d2-table-header>
<auth-button
category=
"Button"
:data=
"editFormReset"
></auth-button>
</d2-table-header>
<d2-table
ref=
"serviceStoreTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
></auth-button>
</d2-table>
</d2-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getList
}
from
'@api/serviceStore'
export
default
{
export
default
{
name
:
'serviceStore'
,
name
:
'serviceStore'
,
data
()
{
data
()
{
return
{
return
{
}
searchForm
:
{
name
:
''
,
class1
:
''
,
class2
:
''
,
brandName
:
''
},
editFormReset
:
{
aa
:
''
},
getListApi
:
getList
,
// 表格参数
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'用户ID'
,
prop
:
'userId'
},
{
label
:
'登录账户'
,
prop
:
'loginName'
},
{
label
:
'商户号'
,
prop
:
'merchant'
},
{
label
:
'商户名称'
,
prop
:
'merchantName'
},
{
label
:
'商户简称'
,
prop
:
'merchantAbbreviation'
},
{
label
:
'商户类型'
,
prop
:
'merchantType'
},
{
label
:
'联系人'
,
prop
:
'contacts'
},
{
label
:
'手机号'
,
prop
:
'phone'
},
{
label
:
'角色权限'
,
prop
:
'role'
},
{
label
:
'商户地址'
,
prop
:
'address'
,
width
:
'200'
},
{
label
:
'上级商户号'
,
prop
:
'superMerchant'
},
{
label
:
'上级商户名称'
,
prop
:
'superMerchantName'
},
{
label
:
'更新时间'
,
prop
:
'updateTime'
}]
},
},
components
:
{},
}
},
computed
:
{},
components
:
{
// storeDetail
},
mounted
()
{},
mounted
()
{
// console.log(storeDetail)
// var allOpt = { confId: '', confKey: '全部' }
// this.baseData.product.unshift(allOpt)
// this.baseData.brandList.unshift(allOpt)
},
methods
:
{}
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
console
.
log
(
'搜索前操作--'
)
resolve
()
})
},
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
},
handleReset
()
{
},
handleAdd
(
form
)
{
console
.
log
(
form
)
},
handleAdd
(
row
)
{
console
.
log
(
row
)
},
handleDelete
(
row
)
{
console
.
log
(
row
)
this
.
$confirm
(
'是否要进行删除操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
});
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment