Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 62d1b189
authored
Oct 22, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品-已入库
1 parent
7eb16e57
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
89 deletions
src/api/modules/cmmodityLibrary.js
src/views/cmmodityLibrary/editProduct.vue
src/views/cmmodityLibrary/warehousList.vue
src/views/cmmodityLibrary/warehousingList.vue
src/api/modules/cmmodityLibrary.js
View file @
62d1b18
...
@@ -65,4 +65,15 @@ const insertGoodGroupApi = params => {
...
@@ -65,4 +65,15 @@ const insertGoodGroupApi = params => {
})
})
}
}
export
{
getWarehousListApi
,
auditGoodApi
,
getGoodInfoApi
,
getGoodGroupInfoApi
,
insertGoodApi
,
insertGoodGroupApi
}
const
deleteGoodApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
delete.goods`
return
http
({
url
:
'rop-scrm-live/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
{
getWarehousListApi
,
auditGoodApi
,
getGoodInfoApi
,
getGoodGroupInfoApi
,
insertGoodApi
,
insertGoodGroupApi
,
deleteGoodApi
}
src/views/cmmodityLibrary/editProduct.vue
View file @
62d1b18
...
@@ -209,10 +209,10 @@ export default {
...
@@ -209,10 +209,10 @@ export default {
params
.
price
=
this
.
editForm
.
price
*
100
params
.
price
=
this
.
editForm
.
price
*
100
params
.
shopMallGoodsInfo
=
{
params
.
shopMallGoodsInfo
=
{
goodsId
:
this
.
selectedProInfo
.
id
,
goodsId
:
this
.
selectedProInfo
.
id
,
name
:
this
.
selectedProInfo
.
goodsName
,
//
name: this.selectedProInfo.goodsName,
merchantId
:
this
.
selectedProInfo
.
merchantId
,
merchantId
:
this
.
selectedProInfo
.
merchantId
,
merchantName
:
this
.
selectedProInfo
.
merchantName
,
merchantName
:
this
.
selectedProInfo
.
merchantName
,
selfGoodsImageUrl
:
this
.
selectedProInfo
.
goodsImage
//
selfGoodsImageUrl: this.selectedProInfo.goodsImage
}
}
insertGoodApi
(
params
).
then
(
res
=>
{
insertGoodApi
(
params
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
...
...
src/views/cmmodityLibrary/warehousList.vue
View file @
62d1b18
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
<div></div>
<GLTable
ref=
"warehousListRef"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"warehousListRef"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<span
slot=
"coverImgUrl"
slot-scope=
"scope"
>
<span
slot=
"coverImgUrl"
slot-scope=
"scope"
>
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl"
/>
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl"
/>
...
@@ -36,7 +35,7 @@
...
@@ -36,7 +35,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getWarehousListApi
,
auditGoodApi
}
from
'@/api/modules/cmmodityLibrary'
import
{
getWarehousListApi
,
auditGoodApi
,
deleteGoodApi
}
from
'@/api/modules/cmmodityLibrary'
import
{
auditStatusList
}
from
'@/common/constant'
import
{
auditStatusList
}
from
'@/common/constant'
export
default
{
export
default
{
name
:
'warehousList'
,
name
:
'warehousList'
,
...
@@ -146,9 +145,14 @@ export default {
...
@@ -146,9 +145,14 @@ export default {
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
type
:
'error'
,
type
:
'error'
,
callback
:
action
=>
{
callback
:
action
=>
{
this
.
$message
({
deleteGoodApi
({
id
:
row
.
id
}).
then
(
res
=>
{
type
:
'success'
,
this
.
$message
({
message
:
'操作成功'
message
:
res
.
code
==
'0'
?
'操作成功'
:
'操作失败'
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
handleSearch
()
}
})
})
}
}
})
})
...
...
src/views/cmmodityLibrary/warehousingList.vue
View file @
62d1b18
<
template
>
<
template
>
<div>
<div>
<
el-card
shadow=
"never"
slot=
"header
"
>
<
div
class=
"flex
"
>
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"demo-form-inline"
size=
"small"
>
<el-form
:inline=
"true"
:model=
"searchForm"
>
<el-form-item
label=
"商品搜索
:
"
>
<el-form-item
label=
"商品搜索
:
"
>
<el-input
v-model=
"searchForm.proName"
placeholder=
"请输入商品名称"
clearable
/
>
<el-input
:size=
"size"
v-model=
"searchForm.name"
placeholder=
"请输入商品名称"
clearable
></el-input
>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
:loading=
"tableLoading"
@
click=
"getList()"
>
搜索
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
<el-form-item>
<el-button
:loading=
"tableLoading"
@
click=
"reset()"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</
el-card
>
</
div
>
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"wareRef"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableData=
"tableData"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<GLTable
ref=
"wareRef"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
>
<span
slot=
"showImg"
slot-scope=
"scope"
>
<span
slot=
"coverImgUrl"
slot-scope=
"scope"
>
<img
class=
"img-60"
:src=
"scope.scope.pic"
/>
<img
class=
"img-60"
:src=
"scope.scope.coverImgUrl"
/>
{{
scope
.
scope
.
title
}}
</span>
</span>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
@
click=
"updatePrice(scope.scope)"
>
修改价格
</el-button>
<el-button
type=
"text"
@
click=
"handleEdit(scope.scope)"
>
修改价格
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
</span>
</span>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
...
@@ -43,10 +41,7 @@
...
@@ -43,10 +41,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
// import {
import
{
getWarehousListApi
,
deleteGoodApi
}
from
'@/api/modules/cmmodityLibrary'
// GETLISTUSERINFO,
// UPDATEPASSWORD
// } from '@/http/interface'
import
glsxDialog
from
'@/components/glsx-dialog'
import
glsxDialog
from
'@/components/glsx-dialog'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -54,26 +49,36 @@ export default {
...
@@ -54,26 +49,36 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
searchForm
:
{
searchForm
:
{
proName
:
''
name
:
''
,
status
:
'2'
},
},
// 表格组件
getListApi
:
getWarehousListApi
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
true
,
tableOption
:
true
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'基本信息'
,
label
:
'商品标题'
,
prop
:
'pic'
,
prop
:
'name'
line
:
1
,
},
addHtml
:
'showImg'
{
label
:
'直播间图片'
,
prop
:
'coverImgUrl'
,
addHtml
:
'coverImgUrl'
},
},
{
{
label
:
'价格(元)'
,
label
:
'价格(元)'
,
prop
:
'price'
prop
:
'price'
,
formatter
:
cellValue
=>
{
return
cellValue
.
price2
&&
cellValue
.
price1
!=
cellValue
.
price2
?
(
cellValue
.
price1
/
100
).
toFixed
(
2
)
+
'-'
+
(
cellValue
.
price2
/
100
).
toFixed
(
2
)
:
(
cellValue
.
price1
/
100
).
toFixed
(
2
)
}
},
},
{
{
label
:
'来源门店'
,
label
:
'来源门店'
,
prop
:
'merchant'
prop
:
'merchant
Name
'
}
}
]
]
},
},
...
@@ -87,7 +92,6 @@ export default {
...
@@ -87,7 +92,6 @@ export default {
merchant
:
'xxx'
merchant
:
'xxx'
}
}
],
],
tableLoading
:
false
,
pageTotal
:
0
,
pageTotal
:
0
,
userInfo
:
{},
userInfo
:
{},
currentPage
:
1
,
currentPage
:
1
,
...
@@ -106,67 +110,38 @@ export default {
...
@@ -106,67 +110,38 @@ export default {
},
},
created
()
{},
created
()
{},
mounted
:
function
()
{
mounted
:
function
()
{},
// this.getList()
},
methods
:
{
methods
:
{
beforeSearchFn
()
{
handleReset
()
{
return
new
Promise
(
resolve
=>
{
this
.
searchForm
=
{
resolve
()
name
:
''
,
})
status
:
'2'
},
}
this
.
handleSearch
()
/**
* 查询列表
*/
getList
:
function
(
current
)
{
const
_this
=
this
const
oParams
=
_this
.
getParams
()
// oParams.pageNum = current || _this.currentPage
_this
.
tableLoading
=
true
let
list
=
[
{
id
:
1
,
pic
:
'https://t7.baidu.com/it/u=4162611394,4275913936&fm=193&f=GIF'
,
title
:
'商品标题'
,
price
:
999
,
merchant
:
'xxx'
}
]
// GETLISTUSERINFO(oParams).then(res => {
// console.log(res)
_this
.
tableLoading
=
false
// if (res.returnCode == 0) {
// const { data } = res
// const { total, list } = data
_this
.
tableData
=
list
||
[]
// _this.pageTotal = total
// }
// })
},
/**
* 获取查询参数
*/
getParams
:
function
()
{
const
oParams
=
this
.
searchForm
oParams
.
pageSize
=
this
.
pageSize
return
oParams
},
},
handleSearch
()
{
/**
this
.
$refs
.
wareRef
.
refreshTable
()
* 每页展示
*/
changePageSize
:
function
(
e
)
{
this
.
pageSize
=
e
this
.
getList
()
},
},
reset
()
{
handleDelete
(
row
)
{
this
.
$refs
.
wareRef
.
refreshTable
()
this
.
$messageBox
.
alert
(
'是否删除该商品?'
,
'删除'
,
{
confirmButtonText
:
'确定'
,
type
:
'error'
,
callback
:
action
=>
{
// deleteGoodApi({ id: row.id }).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleSearch()
// }
// })
}
})
},
},
updatePrice
:
function
()
{
handleEdit
:
function
()
{
this
.
showPriceDialog
=
true
this
.
showPriceDialog
=
true
},
},
...
...
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