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
8bd0d381
Commit
8bd0d381
authored
Feb 18, 2021
by
萱草
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 礼品管理
parent
bfc9fabc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
56 deletions
+88
-56
common.js
src/utils/common.js
+20
-2
update-multi-cost.vue
src/views/gift-manage/module/update-multi-cost.vue
+0
-0
update-multi-stock.vue
src/views/gift-manage/module/update-multi-stock.vue
+37
-28
real-gift-detail.vue
src/views/gift-manage/real-gift-detail.vue
+7
-2
real-gift.vue
src/views/gift-manage/real-gift.vue
+10
-8
virtual-gift.vue
src/views/gift-manage/virtual-gift.vue
+14
-16
No files found.
src/utils/common.js
View file @
8bd0d381
...
...
@@ -158,4 +158,22 @@ export const toLog = (appCode, id, name, ecuId) => {
}
else
{
window
.
open
(
url
,
'_blank'
,
'noopener'
);
}
};
\ No newline at end of file
};
// 处理时间
// export const formatDate = time => {
// if (!isNaN(time)) time = Number(time);
// let now = new Date(time);
// let year = now.getFullYear();
// let month = now.getMonth() + 1;
// month >= 10 ? (month = month) : (month = '0' + month); //判断小于10月份的情况
// let date = now.getDate();
// date >= 10 ? (date = date) : (date = '0' + date); //判断小于10日的情况
// let hour = now.getHours();
// hour >= 10 ? (hour = hour) : (hour = '0' + hour); //判断小于10的时的情况
// let minute = now.getMinutes();
// minute >= 10 ? (minute = minute) : (minute = '0' + minute); //判断小于10的分的情况
// let second = now.getSeconds();
// second >= 10 ? (second = second) : (second = '0' + second); //判断小于10的秒的情况
// return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second;
// };
\ No newline at end of file
src/views/gift-manage/module/update-multi-cost.vue
View file @
8bd0d381
This diff is collapsed.
Click to expand it.
src/views/gift-manage/module/update-multi-stock.vue
View file @
8bd0d381
<
template
>
<el-dialog
title=
"调整库存"
:visible
.
sync=
"dialogVisible"
width=
"750px"
@
close=
"cancelSubmit()"
>
<div
v-loading=
"loading"
>
<div
class=
"fr mb20"
>
<el-select
v-model=
"stockType"
style=
"width:100px;margin-right:10px"
>
<div>
<div
class=
"fr mb20"
>
<el-select
v-model=
"stockType"
style=
"width:100px;margin-right:10px"
>
<el-option
label=
"增加"
:value=
"0"
></el-option>
<el-option
label=
"减少"
:value=
"1"
></el-option>
</el-select>
<el-input
placeholder=
"输入库存"
style=
"width:85px;margin-right:10px"
v-model=
"banthStock"
precision=
"0"
:min=
"0"
:max=
"999999"
></el-input>
<el-button
type=
"primary"
@
click=
"handleStock"
>
批量填充
</el-button>
</div>
<el-table
:data=
"tableData"
:span-method=
"objectSpanMethod"
border
>
<el-table-column
label=
"颜色"
prop=
"color"
width=
"90px"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
color
}}
</
template
>
</el-table-column>
<el-table-column
label=
"尺码"
prop=
"size"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
size
}}
</
template
>
</el-table-column>
<el-table-column
label=
"当前可占用"
prop=
"remainedStock"
width=
"100px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remainedStock
}}
</
template
>
</el-table-column>
<el-table-column
label=
"增加/减少"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.stockType"
style=
"width:100px"
>
<el-option
label=
"增加"
:value=
"0"
></el-option>
<el-option
label=
"减少"
:value=
"1"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"库存"
>
<
template
slot-scope=
"scope"
>
<dm-input-amount
width=
"200px"
@
change=
"changeSingleStock(scope.row.giftSkuId, scope.row.stock, scope.row.stockType)"
v-model
.
trim=
"scope.row.stock"
precision=
"0"
:min=
"0"
:max=
"999999"
></dm-input-amount>
</
template
>
</el-table-column>
</el-table>
</div>
<div>
<el-select
v-model=
"stockType"
style=
"width:100px;display:inline-block;margin-right:10px"
>
<el-option
label=
"增加"
:value=
"0"
></el-option>
<el-option
label=
"减少"
:value=
"1"
></el-option>
</el-select>
<el-input
placeholder=
"输入库存"
style=
"width:85px;margin-right:10px"
v-model=
"banthStock"
precision=
"0"
:min=
"0"
:max=
"999999"
></el-input>
<el-button
type=
"primary"
@
click=
"handleStock"
>
批量填充
</el-button>
<el-input-number
v-model=
"stock"
precision=
"0"
:min=
"0"
:max=
"999999"
style=
"width:300px"
></el-input-number>
</div>
<el-table
:data=
"tableData"
:span-method=
"objectSpanMethod"
border
>
<el-table-column
label=
"颜色"
prop=
"color"
width=
"90px"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
color
}}
</
template
>
</el-table-column>
<el-table-column
label=
"尺码"
prop=
"size"
width=
"90px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
size
}}
</
template
>
</el-table-column>
<el-table-column
label=
"当前可占用"
prop=
"remainedStock"
width=
"100px"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remainedStock
}}
</
template
>
</el-table-column>
<el-table-column
label=
"增加/减少"
width=
"150px"
>
<
template
slot-scope=
"scope"
>
<el-select
v-model=
"scope.row.stockType"
style=
"width:100px"
>
<el-option
label=
"增加"
:value=
"0"
></el-option>
<el-option
label=
"减少"
:value=
"1"
></el-option>
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"库存"
>
<
template
slot-scope=
"scope"
>
<dm-input-amount
width=
"200px"
@
change=
"changeSingleStock(scope.row.giftSkuId, scope.row.stock, scope.row.stockType)"
v-model
.
trim=
"scope.row.stock"
precision=
"0"
:min=
"0"
:max=
"999999"
></dm-input-amount>
</
template
>
</el-table-column>
</el-table>
<el-input
type=
"textarea"
class=
"mt20"
:rows=
"3"
placeholder=
"请填入调整备注"
v-model=
"textarea"
:maxlength=
"240"
show-word-limit
></el-input>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
src/views/gift-manage/real-gift-detail.vue
View file @
8bd0d381
...
...
@@ -557,7 +557,8 @@ export default {
for
(
let
i
=
0
;
i
<
skuList
.
length
;
i
++
)
{
mapData
.
push
({
mapId
:
''
,
giftSkuId
:
[],
id
:
[],
giftSkuId
:
skuList
[
i
].
giftSkuId
,
giftSkuCostPrice
:
skuList
[
i
].
giftSkuCostPrice
,
giftSkuCode
:
skuList
[
i
].
giftSkuCode
,
skuBarCode
:
skuList
[
i
].
skuBarCode
,
...
...
@@ -578,6 +579,7 @@ export default {
stock
:
item
.
stock
,
giftSkuCostPriceStatus
:
true
,
stockStatus
:
true
,
giftSkuId
:
item
.
giftSkuId
,
};
}
this
.
skuSellObj
=
deepClone
(
skuSellObj
);
...
...
@@ -957,7 +959,7 @@ export default {
i
.
specStandardName
=
item
.
specName
;
i
.
specStandardId
=
item
.
specId
;
}
this
.
skuCols
.
push
(
item
.
specName
);
this
.
skuCols
.
push
(
item
.
spec
Standard
Name
);
arr
.
push
(
item
.
valueList
);
}
...
...
@@ -1005,6 +1007,7 @@ export default {
stock
:
Object
.
keys
(
skuSellObjCopy
).
length
>
0
?
skuSellObjCopy
[
item
.
mapId
].
stock
:
''
,
giftSkuCode
:
Object
.
keys
(
skuSellObjCopy
).
length
>
0
?
skuSellObjCopy
[
item
.
mapId
].
giftSkuCode
:
''
,
skuBarCode
:
Object
.
keys
(
skuSellObjCopy
).
length
>
0
?
skuSellObjCopy
[
item
.
mapId
].
skuBarCode
:
''
,
giftSkuId
:
Object
.
keys
(
skuSellObjCopy
).
length
>
0
?
skuSellObjCopy
[
item
.
mapId
].
giftSkuId
:
''
,
stockStatus
:
true
,
giftSkuCostPriceStatus
:
true
,
// skuId: Object.keys(skuSellObjCopy).length > 0 ? skuSellObjCopy[item.mapId].skuId : ''
...
...
@@ -1018,6 +1021,7 @@ export default {
skuBarCode
:
''
,
stockStatus
:
true
,
giftSkuCostPriceStatus
:
true
,
giftSkuId
:
''
// skuId: ''
};
}
...
...
@@ -1149,6 +1153,7 @@ export default {
});
skuList
.
push
({
gift
:
this
.
giftId
,
giftSkuId
:
this
.
skuSellObj
[
item
].
stock
,
stock
:
this
.
skuSellObj
[
item
].
stock
,
giftSkuCode
:
this
.
skuSellObj
[
item
].
giftSkuCode
,
skuBarCode
:
this
.
skuSellObj
[
item
].
skuBarCode
,
...
...
src/views/gift-manage/real-gift.vue
View file @
8bd0d381
...
...
@@ -68,7 +68,7 @@
</p>
</
template
>
</el-table-column>
<el-table-column
sortable=
"custom"
label=
"库存"
min-width=
"1
2
0px"
prop=
"stock"
>
<el-table-column
sortable=
"custom"
label=
"库存"
min-width=
"1
3
0px"
prop=
"stock"
>
<
template
slot=
"header"
>
<el-tooltip
open-delay=
"200"
effect=
"dark"
style=
"width:250px"
placement=
"top"
>
<span
class=
"undeline-dash"
>
库存
</span>
...
...
@@ -294,6 +294,7 @@ export default {
console
.
log
(
'获取列表详情'
);
let
params
=
{
...
this
.
query
,
giftType
:
1
};
giftPage
(
params
).
then
(
res
=>
{
console
.
log
(
res
);
...
...
@@ -405,7 +406,8 @@ export default {
console
.
log
(
'批量操作'
);
},
changeShow
(
item
){
if
(
item
.
statusFlag
==
0
&&
item
.
hiddenFlag
==
1
){
console
.
log
(
item
.
statusFlag
,
item
.
hiddenFlag
);
if
(
item
.
statusFlag
==
0
&&
item
.
hiddenFlag
==
0
){
this
.
$confirm
(
'<div>该礼品已禁用,不可关闭隐藏状态?</div>'
,
'提示'
,
{
closeOnClickModal
:
false
,
showClose
:
false
,
...
...
@@ -413,7 +415,9 @@ export default {
customClass
:
'show-title'
,
dangerouslyUseHTMLString
:
true
,
confirmButtonText
:
'确认'
,
showCancelButton
:
false
});
item
.
hiddenFlag
=
1
;
}
console
.
log
(
'更改隐藏状态'
,
item
);
this
.
getTableList
();
...
...
@@ -450,7 +454,7 @@ export default {
updateCost
(
item
)
{
console
.
log
(
'修改成本'
,
item
);
this
.
updateCostData
.
id
=
item
.
giftId
;
this
.
updateCostData
.
costPrice
=
item
.
costPrice
;
//
this.updateCostData.costPrice = item.costPrice;
// this.updateCostData.textarea = item.textarea;
this
.
updateCostDialog
=
true
;
},
...
...
@@ -462,10 +466,8 @@ export default {
add
()
{
console
.
log
(
'新建礼品,跳转'
);
this
.
$router
.
push
({
path
:
'/gift-manage/real-gift-detail'
,
query
:
{
giftId
:
''
}
});
// this.$router.push({ path: '/real-gift-detail' });
// http://git.gicdev.com/dm4/welfare.git
},
//
edit(item) {
edit
(
item
)
{
// console.log('编辑实物礼品', item);
// let giftObj = {
// pageNum: this.pageNum,
...
...
@@ -478,8 +480,8 @@ export default {
// // activeName: this.activeName
// };
// window.localStorage.setItem('giftObj', JSON.stringify(giftObj)); // 搜索条件放入缓存
// this.$router.push({ path: '/addGift', query: { goodsType: item.proType, goodsId: item.goods
Id } });
//
}
this
.
$router
.
push
({
path
:
'/gift-manage/real-gift-detail'
,
query
:
{
giftId
:
item
.
gift
Id
}
});
}
},
};
</
script
>
...
...
src/views/gift-manage/virtual-gift.vue
View file @
8bd0d381
...
...
@@ -60,7 +60,7 @@
</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
>
<
template
slot-scope=
"scope"
><span
v-html=
"
getTimesByReq
(scope.row.updateTime)"
></span></
template
>
</el-table-column>
<el-table-column
prop=
"costPrice"
label=
"成本"
sortable=
"custom"
min-width=
"150px"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -184,6 +184,7 @@ import checkUploadDetail from './module/check-upload-detail';
// import updateSkuIntegral from '../../components/updateSkuIntegral';
// import { mapGetters } from 'vuex';
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
{
getTimesByReq
}
from
'@/utils/common.js'
;
import
api
from
'@/api/gift.js'
;
const
{
giftPage
,
batchUpdate
}
=
api
;
export
default
{
...
...
@@ -216,6 +217,7 @@ export default {
currentPage
:
1
,
pageSize
:
20
,
},
getTimesByReq
,
proType
:
''
,
status
:
''
,
batchOperate
:
''
,
...
...
@@ -309,11 +311,13 @@ export default {
// // this.activeName = giftObj.activeName;
// localStorage.removeItem('giftObj'); // 使用完就清除缓存
// }
typeof
this
.
tableData
[
0
].
updateTime
;
this
.
init
();
},
methods
:
{
formatDateTimeByType
,
init
()
{
// typeof this.tableData[0].updateTime;
this
.
getTableList
();
},
getSearchList
()
{
...
...
@@ -371,23 +375,17 @@ export default {
// 排序
sortChange
(
value
)
{
if
(
value
.
order
==
'ascending'
)
{
this
.
sortOrder
=
'asc'
;
this
.
query
.
sortOrder
=
'asc'
;
}
else
if
(
value
.
order
==
'descending'
)
{
this
.
sortOrder
=
'desc'
;
this
.
query
.
sortOrder
=
'desc'
;
}
if
(
value
.
prop
===
'updateTime'
)
{
this
.
query
.
sortColumn
=
'update_time'
;
}
else
if
(
value
.
prop
===
'costPrice'
)
{
this
.
query
.
sortColumn
=
'cost_price'
;
}
else
if
(
value
.
prop
===
'stock'
)
{
this
.
query
.
sortColumn
=
'stock'
;
}
// if (value.prop === 'goodsIntegral') {
// this.sortColumn = 'goods_integral';
// } else if (value.prop === 'goodsPrice') {
// this.sortColumn = 'goods_price';
// } else if (value.prop === 'goodsStock') {
// this.sortColumn = 'goods_stock';
// } else if (value.prop === 'allExchangeNumber') {
// this.sortColumn = 'all_exchange_number';
// } else if (value.prop === 'createTime') {
// this.sortColumn = 'create_time';
// } else if (value.prop === 'sort') {
// this.sortColumn = 'sort';
// }
this
.
getTableList
();
},
handleSelectAll
(
val
)
{
...
...
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