Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
达摩4.0重构
welfare
Commits
99f8e308
Commit
99f8e308
authored
Feb 08, 2021
by
萱草
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 礼品管理
parent
696347dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
130 additions
and
41 deletions
+130
-41
eg.png
src/assets/images/eg.png
+0
-0
virtual-gift.js
src/router/virtual-gift.js
+4
-0
update-cost.vue
src/views/gift-manage/module/update-cost.vue
+2
-1
update-multi-cost.vue
src/views/gift-manage/module/update-multi-cost.vue
+1
-0
update-multi-stock.vue
src/views/gift-manage/module/update-multi-stock.vue
+2
-1
update-stock.vue
src/views/gift-manage/module/update-stock.vue
+1
-0
real-gift-detail.vue
src/views/gift-manage/real-gift-detail.vue
+0
-0
real-gift.vue
src/views/gift-manage/real-gift.vue
+43
-18
virtual-gift-detail.vue
src/views/gift-manage/virtual-gift-detail.vue
+0
-0
virtual-gift.vue
src/views/gift-manage/virtual-gift.vue
+77
-21
No files found.
src/assets/images/eg.png
0 → 100644
View file @
99f8e308
39.8 KB
src/router/virtual-gift.js
View file @
99f8e308
...
...
@@ -9,6 +9,10 @@ export default [
{
path
:
'virtual-gift'
,
component
:
()
=>
import
(
'@/views/gift-manage/virtual-gift.vue'
),
},
{
path
:
'virtual-gift-detail'
,
component
:
()
=>
import
(
'@/views/gift-manage/virtual-gift-detail.vue'
),
}
],
},
...
...
src/views/gift-manage/module/update-cost.vue
View file @
99f8e308
<
template
>
<el-dialog
title=
"调整成本
问题
"
:visible
.
sync=
"dialogVisible"
width=
"500px"
@
close=
"cancelSubmit()"
>
<el-dialog
title=
"调整成本
费用
"
:visible
.
sync=
"dialogVisible"
width=
"500px"
@
close=
"cancelSubmit()"
>
<div
v-loading=
"loading"
>
<el-input-number
v-model=
"updateCostData.costPrice"
precision=
"2"
:min=
"0"
:max=
"999999.99"
style=
"width:400px"
></el-input-number>
<el-input
type=
"textarea"
:rows=
"3"
placeholder=
"请填入调整备注"
v-model=
"updateCostData.textarea"
:max=
"240"
></el-input>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelSubmit()"
>
取消
</el-button>
...
...
src/views/gift-manage/module/update-multi-cost.vue
View file @
99f8e308
...
...
@@ -18,6 +18,7 @@
</
template
>
</el-table-column>
</el-table>
<el-input
type=
"textarea"
:rows=
"3"
placeholder=
"请填入调整备注"
v-model=
"updateCostData.textarea"
:max=
"240"
></el-input>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelSubmit()"
>
取消
</el-button>
...
...
src/views/gift-manage/module/update-multi-stock.vue
View file @
99f8e308
...
...
@@ -33,6 +33,7 @@
</
template
>
</el-table-column>
</el-table>
<el-input
type=
"textarea"
:rows=
"3"
placeholder=
"请填入调整备注"
v-model=
"stockData.textarea"
:max=
"240"
></el-input>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelSubmit()"
>
取消
</el-button>
...
...
@@ -45,7 +46,7 @@
// import request from '../service/request.js';
export
default
{
props
:
{
updateCost
Data
:
{
stock
Data
:
{
type
:
Object
,
default
()
{
return
{};
...
...
src/views/gift-manage/module/update-stock.vue
View file @
99f8e308
...
...
@@ -6,6 +6,7 @@
<el-option
label=
"减少"
:value=
"2"
></el-option>
</el-select>
<el-input-number
v-model=
"stockData.remainedStock"
precision=
"2"
:min=
"0"
:max=
"999999"
style=
"width:300px"
></el-input-number>
<el-input
type=
"textarea"
:rows=
"3"
placeholder=
"请填入调整备注"
v-model=
"stockData.textarea"
:max=
"240"
></el-input>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelSubmit()"
>
取消
</el-button>
...
...
src/views/gift-manage/real-gift-detail.vue
View file @
99f8e308
This diff is collapsed.
Click to expand it.
src/views/gift-manage/real-gift.vue
View file @
99f8e308
...
...
@@ -36,30 +36,31 @@
<div
class=
"spanclass"
>
-
</div>
<dm-input-amount
precision=
"2"
:min=
"0"
:max=
"9999999.99"
class=
"mr20 ml10 w100"
v-model
.
trim=
"costValue2"
></dm-input-amount>
<div
class=
"spanclass"
>
可占库存
</div>
<dm-input-number
precision=
"
2"
:min=
"0"
:max=
"9999999"
class=
"mr10 ml10 w100"
v-model=
"remainedStock1
"
></dm-input-number>
<dm-input-number
precision=
"
0"
:min=
"0"
:max=
"9999999"
class=
"mr10 ml10 w100"
v-model=
"remainedStock1"
placeholder=
"请输入
"
></dm-input-number>
<div
class=
"spanclass"
>
-
</div>
<dm-input-number
precision=
"
2"
:min=
"0"
:max=
"9999999"
class=
"ml10 w100"
v-model=
"remainedStock2
"
></dm-input-number>
<dm-input-number
precision=
"
0"
:min=
"0"
:max=
"9999999"
class=
"ml10 w100"
v-model=
"remainedStock2"
placeholder=
"请输入
"
></dm-input-number>
</div>
<div
class=
"table-content"
>
<el-table
:data=
"tableData"
ref=
"multipleTable"
style=
"width: 100%"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelectAll"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"礼品信息"
width=
"
36
0px"
>
<el-table-column
label=
"礼品信息"
width=
"
20
0px"
>
<template
slot-scope=
"scope"
>
<div
class=
"img-text"
>
<dm-preview-img
:img=
"scope.row.goodsImageUrl"
style=
"display:inline-block;border: 1px solid #dcdfe6;padding:4px;border-radius:2px;"
width=
"50"
height=
"50"
></dm-preview-img>
<div
class=
"text"
>
<p
class=
"goods-descript"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"'福利id:' + scope.row.giftId"
placement=
"top-start"
>
<span>
{{
scope
.
row
.
giftName
}}
</span>
</el-tooltip>
<span>
{{
scope
.
row
.
giftName
}}
</span>
<i
class=
"el-icon-edit-outline"
@
click=
"handleName(scope.row)"
></i>
</p>
<p
class=
"goods-code"
>
礼品编码:
{{
scope
.
row
.
giftNo
}}
</p>
<p
class=
"goods-code"
>
更新时间:
{{
scope
.
row
.
updateName
}}
</p>
<p
class=
"goods-code"
>
福利id:
{{
scope
.
row
.
giftId
}}
</p>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"costPrice"
label=
"更新时间"
sortable=
"custom"
min-width=
"150px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
updateName
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"costPrice"
label=
"成本"
sortable=
"custom"
min-width=
"150px"
>
<
template
slot-scope=
"scope"
>
<p
class=
"stock-box"
>
...
...
@@ -69,6 +70,17 @@
</
template
>
</el-table-column>
<el-table-column
sortable=
"custom"
label=
"库存"
min-width=
"120px"
>
<
template
slot=
"header"
>
<el-tooltip
open-delay=
"200"
effect=
"dark"
style=
"width:250px"
placement=
"top"
>
<span
class=
"undeline-dash"
>
库存
</span>
<span
slot=
"content"
>
可占库存:福利可以被直接使用和被应用占用的数量;
<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;
<br>
总库存:福利实际未产生履约单,还可以被出库的数量;
<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</
template
>
<
template
slot-scope=
"scope"
>
<div>
<p
class=
"stock-box"
>
...
...
@@ -83,6 +95,17 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"allExchangeNumber"
label=
"总出库量"
sortable=
"custom"
min-width=
"100px"
>
<
template
slot=
"header"
>
<el-tooltip
open-delay=
"200"
effect=
"dark"
style=
"width:250px"
placement=
"top"
>
<span
class=
"undeline-dash"
>
总出库量
</span>
<span
slot=
"content"
>
可占库存:福利可以被直接使用和被应用占用的数量;
<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;
<br>
总库存:福利实际未产生履约单,还可以被出库的数量;
<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
historyTotalStock
}}
</span>
</
template
>
...
...
@@ -102,10 +125,8 @@
<div
style=
"font-size:0px"
>
<dm-perm-button
type=
"text"
@
click=
"edit(scope.row, 2)"
>
编辑
</dm-perm-button>
<dm-perm-button
type=
"text"
>
库存记录
</dm-perm-button>
<dm-delete
@
confirm=
"deleteList(scope.row, 0)"
tips=
"禁用后,该福利将不可用,确认禁用该礼品?"
>
<el-button
type=
"text"
>
禁用
</el-button>
</dm-delete>
<!--
<dm-perm-button
type=
"text"
>
启用
</dm-perm-button>
-->
<el-button
v-if=
"scope.row.statusFlag === 0"
type=
"text"
>
禁用
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.statusFlag === 1"
>
启用
</el-button>
</div>
</
template
>
</el-table-column>
...
...
@@ -199,7 +220,8 @@ export default {
// 更新成本数据
updateCostData
:
{
costPrice
:
''
,
id
:
''
id
:
''
,
textarea
:
''
},
updateCostDialog
:
false
,
// 更新名称
...
...
@@ -212,7 +234,8 @@ export default {
// 更新库存
stockData
:
{
id
:
''
,
remainedStock
:
''
remainedStock
:
''
,
textarea
:
''
,
},
StockDialog
:
false
,
// 积分费用
...
...
@@ -229,8 +252,8 @@ export default {
timeValue
:
''
,
costValue1
:
''
,
// 条件筛选最低成本
costValue2
:
''
,
// 条件筛选最高成本
remainedStock1
:
''
,
// 条件筛选最低可占库存
remainedStock2
:
''
,
// 条件筛选最高可占库存
remainedStock1
:
undefined
,
// 条件筛选最低可占库存
remainedStock2
:
undefined
,
// 条件筛选最高可占库存
};
},
created
()
{
...
...
@@ -375,12 +398,14 @@ export default {
updateStock
(
item
)
{
// this.stockData.id = item.goodsId;
this
.
stockData
.
remainedStock
=
item
.
remainedStock
;
this
.
stockData
.
textarea
=
item
.
textarea
;
console
.
log
(
this
.
stockData
.
remainedStock
);
this
.
StockDialog
=
true
;
},
closeUpdateStock
()
{
// this.stockData.id = '';
this
.
stockData
.
remainedStock
=
''
;
this
.
stockData
.
textarea
=
''
;
this
.
StockDialog
=
false
;
},
// 虚拟礼品库存调整
...
...
@@ -419,6 +444,7 @@ export default {
console
.
log
(
'修改成本'
,
item
);
this
.
updateCostData
.
id
=
item
.
giftId
;
this
.
updateCostData
.
costPrice
=
item
.
costPrice
;
this
.
updateCostData
.
textarea
=
item
.
textarea
;
this
.
updateCostDialog
=
true
;
},
closeUpdateCost
()
{
...
...
@@ -495,14 +521,13 @@ export default {
.goods-descript
{
color
:
#606266
;
line-height
:
18px
;
height
:
36px
;
font-size
:
14px
;
margin-bottom
:
10px
;
}
.goods-code
{
color
:
#909399
;
font-size
:
12px
;
line-height
:
17px
;
margin-top
:
5px
;
line-height
:
16px
;
}
}
&
:hover
.el-icon-edit-outline
{
...
...
src/views/gift-manage/virtual-gift-detail.vue
View file @
99f8e308
This diff is collapsed.
Click to expand it.
src/views/gift-manage/virtual-gift.vue
View file @
99f8e308
...
...
@@ -36,30 +36,32 @@
<div
class=
"spanclass"
>
-
</div>
<dm-input-amount
precision=
"2"
:min=
"0"
:max=
"9999999.99"
class=
"mr20 ml10 w100"
v-model
.
trim=
"costValue2"
></dm-input-amount>
<div
class=
"spanclass"
>
可占库存
</div>
<dm-input-number
precision=
"
2"
:min=
"0"
:max=
"9999999"
class=
"mr10 ml10 w100"
v-model=
"remainedStock1
"
></dm-input-number>
<dm-input-number
precision=
"
0"
:min=
"0"
:max=
"9999999"
class=
"mr10 ml10 w100"
v-model=
"remainedStock1"
placeholder=
"请输入
"
></dm-input-number>
<div
class=
"spanclass"
>
-
</div>
<dm-input-number
precision=
"
2"
:min=
"0"
:max=
"9999999"
class=
"ml10 w100"
v-model=
"remainedStock2
"
></dm-input-number>
<dm-input-number
precision=
"
0"
:min=
"0"
:max=
"9999999"
class=
"ml10 w100"
v-model=
"remainedStock2"
placeholder=
"请输入
"
></dm-input-number>
</div>
<div
class=
"table-content"
>
<el-table
:data=
"tableData"
ref=
"multipleTable"
style=
"width: 100%"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelectAll"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"礼品信息"
width=
"3
6
0px"
>
<el-table-column
label=
"礼品信息"
width=
"3
0
0px"
>
<template
slot-scope=
"scope"
>
<div
class=
"img-text"
>
<dm-preview-img
:img=
"scope.row.goodsImageUrl"
style=
"display:inline-block;border: 1px solid #dcdfe6;padding:4px;border-radius:2px;"
width=
"50"
height=
"50"
></dm-preview-img>
<div
class=
"text"
>
<p
class=
"goods-descript"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"'福利id:' + scope.row.giftId"
placement=
"top-start"
>
<span>
{{
scope
.
row
.
giftName
}}
</span>
</el-tooltip>
<span>
{{
scope
.
row
.
giftName
}}
</span>
<i
class=
"el-icon-edit-outline"
@
click=
"handleName(scope.row)"
></i>
</p>
<p
class=
"goods-code"
>
礼品编码:
{{
scope
.
row
.
giftNo
}}
</p>
<p
class=
"goods-code"
>
更新时间:
{{
scope
.
row
.
updateName
}}
</p>
<p
class=
"goods-code"
>
福利id:
{{
scope
.
row
.
giftId
}}
</p>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"updateTime"
label=
"更新时间"
sortable=
"custom"
min-width=
"150px"
>
<!-- <template slot-scope="scope">{{ formatDateTimeByType(scope.row.updateName) }}</template> -->
<
template
slot-scope=
"scope"
><span
v-html=
"formatDateTimeByType(scope.row.updateTime)"
></span></
template
>
</el-table-column>
<el-table-column
prop=
"costPrice"
label=
"成本"
sortable=
"custom"
min-width=
"150px"
>
<
template
slot-scope=
"scope"
>
<p
class=
"stock-box"
>
...
...
@@ -69,6 +71,17 @@
</
template
>
</el-table-column>
<el-table-column
sortable=
"custom"
label=
"库存"
min-width=
"120px"
>
<
template
slot=
"header"
>
<el-tooltip
open-delay=
"200"
effect=
"dark"
style=
"width:250px"
placement=
"top"
>
<span
class=
"undeline-dash"
>
库存
</span>
<span
slot=
"content"
>
可占库存:福利可以被直接使用和被应用占用的数量;
<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;
<br>
总库存:福利实际未产生履约单,还可以被出库的数量;
<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</
template
>
<
template
slot-scope=
"scope"
>
<div>
<p
class=
"stock-box"
>
...
...
@@ -83,6 +96,17 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"allExchangeNumber"
label=
"总出库量"
sortable=
"custom"
min-width=
"100px"
>
<
template
slot=
"header"
>
<el-tooltip
open-delay=
"200"
effect=
"dark"
style=
"width:250px"
placement=
"top"
>
<span
class=
"undeline-dash"
>
总出库量
</span>
<span
slot=
"content"
>
可占库存:福利可以被直接使用和被应用占用的数量;
<br>
已占用:福利已经被应用通过”固定库存“方式占用的数量;
<br>
总库存:福利实际未产生履约单,还可以被出库的数量;
<br>
总出库量:福利从创建到现在已生成履约单的数量;
</span>
</el-tooltip>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
historyTotalStock
}}
</span>
</
template
>
...
...
@@ -102,10 +126,8 @@
<div
style=
"font-size:0px"
>
<dm-perm-button
type=
"text"
@
click=
"edit(scope.row, 2)"
>
编辑
</dm-perm-button>
<dm-perm-button
type=
"text"
>
库存记录
</dm-perm-button>
<dm-delete
@
confirm=
"deleteList(scope.row, 0)"
tips=
"禁用后,该福利将不可用,确认禁用该礼品?"
>
<el-button
type=
"text"
>
禁用
</el-button>
</dm-delete>
<!--
<dm-perm-button
type=
"text"
>
启用
</dm-perm-button>
-->
<el-button
v-if=
"scope.row.statusFlag === 0"
type=
"text"
>
禁用
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.statusFlag === 1"
>
启用
</el-button>
</div>
</
template
>
</el-table-column>
...
...
@@ -143,6 +165,9 @@ import updateName from './module/update-name.vue';
import
updateMultiStock
from
'./module/update-multi-stock.vue'
;
// import updateSkuIntegral from '../../components/updateSkuIntegral';
// import { mapGetters } from 'vuex';
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
api
from
'@/api/gift.js'
;
const
{
giftPage
}
=
api
;
export
default
{
components
:
{
// UpdateCost,
...
...
@@ -197,7 +222,8 @@ export default {
// 更新成本数据
updateCostData
:
{
costPrice
:
''
,
id
:
''
id
:
''
,
textarea
:
''
},
updateCostDialog
:
false
,
// 更新名称
...
...
@@ -210,7 +236,8 @@ export default {
// 更新库存
stockData
:
{
id
:
''
,
remainedStock
:
''
remainedStock
:
''
,
textarea
:
''
,
},
StockDialog
:
false
,
// 积分费用
...
...
@@ -227,8 +254,8 @@ export default {
timeValue
:
''
,
costValue1
:
''
,
// 条件筛选最低成本
costValue2
:
''
,
// 条件筛选最高成本
remainedStock1
:
''
,
// 条件筛选最低可占库存
remainedStock2
:
''
,
// 条件筛选最高可占库存
remainedStock1
:
undefined
,
// 条件筛选最低可占库存
remainedStock2
:
undefined
,
// 条件筛选最高可占库存
};
},
created
()
{
...
...
@@ -249,6 +276,7 @@ export default {
this
.
init
();
},
methods
:
{
formatDateTimeByType
,
init
()
{
this
.
getTableList
();
},
...
...
@@ -271,6 +299,29 @@ export default {
// 实物礼品列表
getTableList
()
{
console
.
log
(
'获取列表详情'
);
let
params
=
{
giftType
:
'1'
,
startTime
:
''
,
startStock
:
''
,
startCostPrice
:
''
,
sortOrder
:
''
,
sortColumn
:
''
,
pageSize
:
''
,
pageNum
:
''
,
hiddenFlag
:
''
,
giftNo
:
''
,
giftName
:
''
,
giftId
:
''
,
giftBarNo
:
''
,
endTime
:
''
,
endStock
:
''
,
endCostPrice
:
''
};
giftPage
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
tableData
=
res
.
result
;
console
.
log
(
this
.
tableData
);
});
},
// 排序
sortChange
(
value
)
{
...
...
@@ -350,12 +401,14 @@ export default {
updateStock
(
item
)
{
// this.stockData.id = item.goodsId;
this
.
stockData
.
remainedStock
=
item
.
remainedStock
;
this
.
stockData
.
textarea
=
item
.
textarea
;
console
.
log
(
this
.
stockData
.
remainedStock
);
this
.
StockDialog
=
true
;
},
closeUpdateStock
()
{
// this.stockData.id = '';
this
.
stockData
.
remainedStock
=
''
;
this
.
stockData
.
textarea
=
''
;
this
.
StockDialog
=
false
;
},
// 虚拟礼品库存调整
...
...
@@ -394,6 +447,7 @@ export default {
console
.
log
(
'修改成本'
,
item
);
this
.
updateCostData
.
id
=
item
.
giftId
;
this
.
updateCostData
.
costPrice
=
item
.
costPrice
;
this
.
updateCostData
.
textarea
=
item
.
textarea
;
this
.
updateCostDialog
=
true
;
},
closeUpdateCost
()
{
...
...
@@ -402,9 +456,12 @@ export default {
this
.
integralDate
.
costPrice
=
''
;
this
.
updateCostDialog
=
false
;
},
// add() {
// console.log('新建礼品,跳转')
// },
add
()
{
console
.
log
(
'新建礼品,跳转'
);
this
.
$router
.
push
({
path
:
'/gift-manage/virtual-gift-detail'
,
query
:
{
giftId
:
''
}
});
// this.$router.push({ path: '/real-gift-detail' });
// http://git.gicdev.com/dm4/welfare.git
},
// edit(item) {
// console.log('编辑实物礼品', item);
// let giftObj = {
...
...
@@ -467,14 +524,13 @@ export default {
.goods-descript
{
color
:
#606266
;
line-height
:
18px
;
height
:
36px
;
font-size
:
14px
;
margin-bottom
:
10px
;
}
.goods-code
{
color
:
#909399
;
font-size
:
12px
;
line-height
:
17px
;
margin-top
:
5px
;
line-height
:
16px
;
}
}
&
:hover
.el-icon-edit-outline
{
...
...
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