Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-dj-oss-equity
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 7d7bdfae
authored
Jul 15, 2021
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
e2d1b254
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
217 additions
and
57 deletions
src/api/api.js
src/assets/css/tao.css
src/assets/css/tao.css.map
src/assets/css/tao.scss
src/views/tao/goods/addGoods/index.vue
src/views/tao/goods/index/index.vue
src/api/api.js
View file @
7d7bdfa
...
@@ -2,6 +2,13 @@ import request from './request'
...
@@ -2,6 +2,13 @@ import request from './request'
import
{
import
{
GlAxios
GlAxios
}
from
'glsx-vue-common'
}
from
'glsx-vue-common'
export
const
commonApi
=
{
/**图片上传接口*/
upLoadImg
(
data
=
{})
{
return
request
(
data
,
'dj.api.scrm.common.upload.image'
,
'post'
,
[
'file'
])
},
}
export
const
orderApi
=
{
export
const
orderApi
=
{
/**获取财务管理列表*/
/**获取财务管理列表*/
getBalanceList
(
data
=
{})
{
getBalanceList
(
data
=
{})
{
...
@@ -40,6 +47,29 @@ export const orderApi = {
...
@@ -40,6 +47,29 @@ export const orderApi = {
getOilOrderList
(
data
=
{})
{
getOilOrderList
(
data
=
{})
{
return
request
(
data
,
'dj.api.scrm.oil.orderPage'
)
return
request
(
data
,
'dj.api.scrm.oil.orderPage'
)
},
},
/**商品分页查询*/
getGoodsList
(
data
=
{})
{
return
request
(
data
,
'dj.api.scrm.goods.listWithPage'
)
},
/** 商品上架下架/支持批量*/
goodsShelves
(
data
=
{})
{
return
request
(
data
,
'dj.api.scrm.goods.shelves'
)
},
/**商品删除/支持批量*/
deleteGoods
(
data
=
{})
{
return
request
(
data
,
'dj.api.scrm.goods.delete'
)
},
/** 商品id获取商品信息*/
getEquityGoodsById
(
data
=
{})
{
return
request
(
data
,
'dj.api.scrm.goods.getEquityGoodsById'
)
},
/** 第三方商品分页查询*/
getListWithPageOutGoods
(
data
=
{
supplier
:
'HW'
,
pageSize
:
99999
})
{
return
request
(
data
,
'dj.api.scrm.goods.listWithPageOutGoods'
)
},
}
}
// export const orderApi = {
// export const orderApi = {
// /**获取财务管理列表*/
// /**获取财务管理列表*/
...
...
src/assets/css/tao.css
View file @
7d7bdfa
...
@@ -109,15 +109,26 @@
...
@@ -109,15 +109,26 @@
width
:
800px
;
width
:
800px
;
}
}
.layout
.box
.avatar-uploader
.el-upload
{
.layout
.box
.avatar-uploader
{
border
:
1px
dashed
#d9d9d9
;
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
border-radius
:
6px
;
cursor
:
pointer
;
cursor
:
pointer
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
width
:
148px
;
height
:
148px
;
}
.layout
.box
.avatar-uploader-file
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
opacity
:
0
;
}
}
.layout
.box
.avatar-uploader
.el-upload
:hover
{
.layout
.box
.avatar-uploader
:hover
{
border-color
:
#409EFF
;
border-color
:
#409EFF
;
}
}
...
...
src/assets/css/tao.css.map
View file @
7d7bdfa
{
{
"version": 3,
"version": 3,
"mappings": "AAAA,AAAA,CAAC,CAAC;EACA,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;CACX;;AAED,AAAA,OAAO,CAAC;EACN,cAAc,EAAE,IAAI;CA
sHrB;;AAvHD,AAEE,OAFK,CAEL,WAAW,CAAC;EACV,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,cAAc,EAAE,MAAM;EACtB,cAAc,EAAE,IAAI;EACpB,aAAa,EAAE,cAAc;CAoB9B;;AA3BH,AAQI,OARG,CAEL,WAAW,CAMT,IAAI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I,OAvGG,CA4CL,IAAI,CA2DF,KAAK,CAAC;EACJ,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,MAAM;EACf,qBAAqB,EAAE,cAAc;CAkBtC;;AA5HL,AA4GQ,OA5GD,CA4CL,IAAI,CA2DF,KAAK,CAIH,UAAU,CACR,UAAU,CAAC;EACT,WAAW,EAAE,GAAG;EAChB,aAAa,EAAE,IAAI;CACpB;;AA/GT,AAgHQ,OAhHD,CA4CL,IAAI,CA2DF,KAAK,CAIH,UAAU,CAKR,KAAK,CAAC;EACJ,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,UAAU;EACvB,aAAa,EAAE,IAAI;CAIpB;;AAvHT,AAoHU,OApHH,CA4CL,IAAI,CA2DF,KAAK,CAIH,UAAU,CAKR,KAAK,CAIH,MAAM,CAAC;EACL,KAAK,EAAE,KAAK;CACb;;AAtHX,AAyHM,OAzHC,CA4CL,IAAI,CA2DF,KAAK,CAkBH,SAAS,CAAC;EACR,UAAU,EAAE,IAAI;CACjB;;AA3HP,AA6HI,OA7HG,CA4CL,IAAI,CAiF
F,KAAK,CAAC;EACJ,OAAO,EAAE,IAAI;CACd",
"sources": [
"sources": [
"tao.scss"
"tao.scss"
],
],
...
...
src/assets/css/tao.scss
View file @
7d7bdfa
...
@@ -73,17 +73,26 @@
...
@@ -73,17 +73,26 @@
.editor
{
.editor
{
width
:
800px
;
width
:
800px
;
}
}
.avatar-uploader
.el-upload
{
.avatar-uploader
{
border
:
1px
dashed
#d9d9d9
;
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
border-radius
:
6px
;
cursor
:
pointer
;
cursor
:
pointer
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
width
:
148px
;
height
:
148px
;
&
-file
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
opacity
:
0
;
}
}
.avatar-uploader
.el-upload
:hover
{
&
:hover
{
border-color
:
#409EFF
;
border-color
:
#409EFF
;
}
}
.avatar-uploader
-icon
{
&
-icon
{
font-size
:
28px
;
font-size
:
28px
;
color
:
#8c939d
;
color
:
#8c939d
;
width
:
148px
;
width
:
148px
;
...
@@ -91,6 +100,7 @@
...
@@ -91,6 +100,7 @@
line-height
:
148px
;
line-height
:
148px
;
text-align
:
center
;
text-align
:
center
;
}
}
}
.avatar
{
.avatar
{
width
:
148px
;
width
:
148px
;
height
:
148px
;
height
:
148px
;
...
...
src/views/tao/goods/addGoods/index.vue
View file @
7d7bdfa
This diff is collapsed.
Click to expand it.
src/views/tao/goods/index/index.vue
View file @
7d7bdfa
...
@@ -3,54 +3,50 @@
...
@@ -3,54 +3,50 @@
<div
class=
"search-box"
>
<div
class=
"search-box"
>
<div
class=
"top"
>
<div
class=
"top"
>
<div
class=
"item"
>
<div
class=
"item"
>
加油日期:
商品名称:
<el-date-picker
<div
class=
"input"
>
v-model=
"searchObj.date"
<el-input
type=
"daterange"
v-model=
"searchObj.productName"
range-separator=
"至"
placeholder=
""
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
size=
"small"
size=
"small"
value-format=
"yyyy-MM-dd"
></el-input>
>
</el-date-picker>
</div>
</div>
<div
class=
"item"
>
加油供应商:
<el-select>
<el-option
label=
"团油"
value=
"0"
>
</el-option>
</el-select>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
供应商订单号
:
商品ID
:
<div
class=
"input"
>
<div
class=
"input"
>
<el-input
<el-input
v-model=
"searchObj.
no
"
v-model=
"searchObj.
id
"
placeholder=
""
placeholder=
""
size=
"small"
size=
"small"
></el-input>
></el-input>
</div>
</div>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
加油用户
:
商品编码
:
<div
class=
"input"
>
<div
class=
"input"
>
<el-input
<el-input
v-model=
"searchObj.
user
"
v-model=
"searchObj.
productId
"
placeholder=
""
placeholder=
""
size=
"small"
size=
"small"
></el-input>
></el-input>
</div>
</div>
</div>
</div>
<div
class=
"item"
>
<div
class=
"item"
>
订单状态:
提供方:
<el-select
<el-select
v-model=
"searchObj.supplier"
>
v-model=
"searchObj.status"
<el-option
placeholder=
"请选择"
v-for=
"item in supplierList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
>
</el-option>
</el-select>
</div>
<div
class=
"item"
>
商品状态:
<el-select
v-model=
"searchObj.status"
>
<el-option
<el-option
v-for=
"item in statusList"
v-for=
"item in statusList"
:key=
"item.value"
:key=
"item.value"
...
@@ -60,11 +56,32 @@
...
@@ -60,11 +56,32 @@
</el-option>
</el-option>
</el-select>
</el-select>
</div>
</div>
<div
class=
"item"
>
品牌名称:
<el-select
v-model=
"searchObj.brandName"
filterable
>
<el-option
v-for=
"item in brandNameList"
:key=
"item.id"
:label=
"item.brandName"
:value=
"item.id"
>
</el-option>
</el-select>
</div>
</div>
</div>
<div
class=
"bottom"
>
<div
class=
"bottom"
>
<el-button-group>
<el-button-group>
<el-button
type=
"primary"
>
查询
</el-button>
<el-button
<el-button
type=
"default"
>
重置
</el-button>
type=
"primary"
@
click=
"search"
>
查询
</el-button>
<el-button
type=
"default"
@
click=
"reset"
>
重置
</el-button>
</el-button-group>
</el-button-group>
</div>
</div>
</div>
</div>
...
@@ -76,8 +93,10 @@
...
@@ -76,8 +93,10 @@
>
新增商品
</el-button>
>
新增商品
</el-button>
</div>
</div>
<d2-table
<d2-table
ref=
"table"
:searchForm=
"searchObj"
:searchForm=
"searchObj"
:tableParams=
"tableParams"
:tableParams=
"tableParams"
:getListApi=
"tableParams.getListApi"
>
>
<span
<span
slot=
"auth-button"
slot=
"auth-button"
...
@@ -86,15 +105,28 @@
...
@@ -86,15 +105,28 @@
>
>
<el-button
<el-button
type=
"text"
type=
"text"
@
click=
"
startcollectiondetails
(scope.scope)"
@
click=
"
jump
(scope.scope)"
>
查看详情
</el-button>
>
查看详情
</el-button>
</span>
</span>
<template
slot=
'custom'
>
<template
slot=
'custom'
>
<div
class=
"table-custom"
>
<div
class=
"table-custom"
>
<el-button-group>
<el-button-group>
<el-button
type=
"primary"
>
上架
</el-button>
<el-button
<el-button
type=
"primary"
>
下架
</el-button>
type=
"primary"
<el-button
type=
"primary"
>
删除
</el-button>
@
click=
"toggleAll"
>
全选
</el-button>
<el-button
type=
"primary"
@
click=
"batchOperation(1)"
>
上架
</el-button>
<el-button
type=
"primary"
@
click=
"batchOperation(2)"
>
下架
</el-button>
<el-button
type=
"primary"
@
click=
"batchOperation(-1)"
>
删除
</el-button>
</el-button-group>
</el-button-group>
</div>
</div>
</
template
>
</
template
>
...
@@ -104,43 +136,58 @@
...
@@ -104,43 +136,58 @@
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
import
{
orderApi
}
from
'@api/api'
import
{
searchMixin
}
from
'@/mixins'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
mixins
:
[
searchMixin
],
data
()
{
data
()
{
return
{
return
{
brandNameList
:
[],
supplierList
:
[
{
label
:
'海威'
,
value
:
'HW'
},
],
statusList
:
[{
statusList
:
[{
label
:
'
已结算
'
,
label
:
'
上架
'
,
value
:
1
value
:
1
},
{
},
{
label
:
'
待结算
'
,
label
:
'
下架
'
,
value
:
2
value
:
2
},
{
},
{
label
:
'
已失效
'
,
label
:
'
待上架
'
,
value
:
3
value
:
0
}],
}],
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
mutiSelectName
:
'goodsIndex'
,
mutiSelectName
:
'goodsIndex'
,
mutiSelectUniqueKey
:
'id'
,
mutiSelectUniqueKey
:
'id'
,
tableOption
:
true
,
tableOption
:
true
,
getListApi
:
orderApi
.
getGoodsList
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'提供方'
,
label
:
'提供方'
,
prop
:
'cardNo'
,
minWidth
:
'200'
,
minWidth
:
'200'
formatter
:
(
cell
)
=>
{
return
'海威'
}
},
},
{
{
label
:
'商品SKU'
,
label
:
'商品SKU'
,
prop
:
'activationCode'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
formatter
:
(
cell
)
=>
{
return
cell
.
appearance
==
1
?
`
${
cell
.
brandName
}${
cell
.
productName
}
`
:
`
${
cell
.
brandName
}${
cell
.
productName
}
\n
${
cell
.
salesPrice
}
元`
}
},
},
{
{
label
:
'销售价(元)'
,
label
:
'销售价(元)'
,
prop
:
's
n
'
,
prop
:
's
alesPrice
'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
},
},
{
{
prop
:
'
mobile
'
,
prop
:
'
sales
'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
sortable
:
true
,
sortable
:
true
,
renderHeader
:
(
h
)
=>
{
renderHeader
:
(
h
)
=>
{
...
@@ -158,18 +205,14 @@ export default {
...
@@ -158,18 +205,14 @@ export default {
},
},
{
{
label
:
'库存'
,
label
:
'库存'
,
prop
:
'
memberName
'
,
prop
:
'
stock
'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
memberCardDefine
.
memberName
}
},
},
{
{
label
:
'商品状态'
,
label
:
'商品状态'
,
prop
:
'updatedDate'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
formatter
:
(
cell
Value
)
=>
{
formatter
:
(
cell
)
=>
{
return
this
.
date_format
(
cellValue
.
updatedDate
)
return
[
'待上架'
,
'上架'
,
'下架'
][
cell
.
status
]
}
}
},
},
...
@@ -178,11 +221,77 @@ export default {
...
@@ -178,11 +221,77 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getListWithPageOutGoods
()
},
},
methods
:
{
methods
:
{
jump
()
{
getListWithPageOutGoods
()
{
window
.
location
.
href
=
'./addGoods.html'
orderApi
.
getListWithPageOutGoods
().
then
(({
code
,
data
:
{
list
}
})
=>
{
if
(
code
==
0
)
{
this
.
brandNameList
=
list
}
}
})
},
jump
({
id
})
{
window
.
location
.
href
=
id
?
`./addGoods.html?id=
${
id
}
`
:
'./addGoods.html'
},
toggleAll
()
{
let
{
goodsIndexMutiTable
}
=
this
.
$refs
.
table
.
$refs
let
{
data
}
=
goodsIndexMutiTable
data
.
map
(
row
=>
{
goodsIndexMutiTable
.
toggleRowSelection
(
row
)
})
},
// ['待上架', '上架', '下架'] //
batchOperation
(
status
)
{
let
{
goodsIndexMutiTable
}
=
this
.
$refs
.
table
.
$refs
let
{
selection
}
=
goodsIndexMutiTable
if
(
!
selection
.
length
)
return
let
ids
=
[]
try
{
selection
.
map
(
e
=>
{
if
(
status
==
1
)
{
if
(
e
.
status
==
1
)
throw
'仅能上架待上架和下架商品'
}
else
if
(
status
==
2
)
{
if
(
e
.
status
!=
1
)
throw
'仅能下架上架商品'
}
else
if
(
status
==
-
1
)
{
if
(
e
.
status
!=
0
)
throw
'仅能删除待上架商品'
}
ids
.
push
(
e
.
id
)
})
}
catch
(
error
)
{
this
.
$message
.
error
(
error
)
return
}
let
content
=
{
'-1'
:
'是否批量删除'
,
'1'
:
'是否批量上架'
,
'2'
:
'是否批量下架'
}
this
.
$confirm
(
content
[
status
],
'提示'
,
{
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
,
type
:
'warning'
,
center
:
true
}).
then
(()
=>
{
let
target
=
'deleteGoods'
let
params
=
{
ids
}
if
(
status
!=
-
1
)
{
target
=
'goodsShelves'
params
.
status
=
status
}
orderApi
[
target
](
params
).
then
(({
code
,
message
})
=>
{
if
(
code
==
0
)
{
this
.
$message
({
message
:
'操作成功!'
,
type
:
'success'
})
this
.
search
()
}
else
{
this
.
$message
.
error
(
message
)
}
})
}).
catch
(()
=>
{
})
},
}
}
}
}
</
script
>
</
script
>
...
...
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